-Subproject commit 8d65dc5494fdbd9069376c2e7117cdb1c4aa581c
+Subproject commit f4b94800676070a94c32e4f2b1bcd2cbf00f50b5
[TestFixture]
public class DataColumnCharTest
{
- private static DataTable _dt = new DataTable();
+ DataTable _dt;
- [Test]
- public void Test1 ()
+ [SetUp]
+ public void Setup ()
{
+ _dt = new DataTable();
+
_dt.Columns.Add(new DataColumn("a", typeof(char)));
AddData('1');
AddData('2');
AddData('3');
AddData('A');
+ }
+ [Test]
+ public void Test1 ()
+ {
Assert.AreEqual (true, FindRow("'A'"), "Test1-1 failed");
Assert.AreEqual (true, FindRow("65"), "Test1-2 failed");
Assert.AreEqual (true, FindRow("'1'"), "Test1-3 failed");
{
FindRow("'65'");
}
+
[Test]
public void Test3 ()
{
Assert.AreEqual (false, FindRow ("1"), "Test3-1 failed");
}
- private static bool FindRow(string f)
+ private bool FindRow(string f)
{
string filter = string.Format("a = {0}", f);
return true;
}
- private static void AddData(char a)
+ private void AddData(char a)
{
DataRow row = _dt.NewRow();
row["a"] = a;
public void Setup () {
currentCultureBackup = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = new CultureInfo ("fi-FI");
+ MyDataSet.count = 0;
}
//[SetUp]
public class MyDataSet:DataSet {
- public static int count = 0;
+ public static int count;
public MyDataSet() {
[TestFixture]
public class DataTableTest : DataSetAssertion
{
+ [SetUp]
+ public void Setup ()
+ {
+ MyDataTable.count = 0;
+ }
+
string EOL = Environment.NewLine;
[Test]
public class MyDataTable : DataTable
{
- public static int count = 0;
+ public static int count;
public MyDataTable()
{
using System.Security;
using System.Security.Policy;
using System.Xml.XPath;
+using System.Xml.XmlConfiguration;
namespace System.Xml.Xsl
{
public void Load (XmlReader stylesheet)
{
- Load (stylesheet, null, null);
+ Load (stylesheet, XsltSettings.Default, XsltConfigSection.CreateDefaultResolver());
}
public void Load (IXPathNavigable stylesheet)
{
- Load (stylesheet.CreateNavigator(), null, null);
+ Load (stylesheet.CreateNavigator(), XsltSettings.Default, XsltConfigSection.CreateDefaultResolver());
}
public void Load (IXPathNavigable stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
{
- if (!settings.EnableDocumentFunction)
- throw new NotSupportedException ("'document' function cannot be disabled on this framework because it just runs XslTransform which does not support XsltSettings");
+// if (!settings.EnableDocumentFunction)
+// throw new NotSupportedException ("'document' function cannot be disabled on this framework because it just runs XslTransform which does not support XsltSettings");
if (settings.EnableScript)
throw new NotSupportedException ("'msxsl:script' element is not supported on this framework because it does not support run-time code generation");
impl.Load (stylesheet, stylesheetResolver);
}
[Test]
+ [Category ("MobileNotWorking")]
public void MSXslNodeSetAcceptsNodeSet ()
{
string xsl = @"<xsl:stylesheet version='1.0'
}
[Test]
+ [Category ("MobileNotWorking")]
public void MSXslNodeSetAcceptsEmptyString ()
{
string xsl = @"<xsl:stylesheet version='1.0'
t.Load (new XmlTextReader (new StringReader (xsl)));
var source = "<?xml version='1.0' encoding='utf-8' ?><Node><Name>123</Name></Node>";
+#if MOBILE
+ var expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Node name=\"123\"></Node>";
+#else
var expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Node name=\"123\" />";
-
+#endif
StringWriter sw = new StringWriter ();
- t.Transform (new XPathDocument (new XmlTextReader (new StringReader (source))), null, sw);
+ var xp = new XPathDocument (new XmlTextReader (new StringReader (source)));
+ t.Transform (xp, null, sw);
Assert.AreEqual (expected, sw.ToString ());
}
[Test] // bug 2917
+ [Category ("MobileNotWorking")]
public void XslOutputSettings ()
{
XslCompiledTransform xslCompiledTransform = new XslCompiledTransform();
}
}
-#if !MONO
+#if !MOBILE
[Test]
public void SerializationCompatibilty ()
{
Assert.AreEqual (UnmanagedType.ByValTStr, attr.Value, "#E2");
Assert.AreEqual (100, attr.SizeConst, "#E3");
+#if FEATURE_COMINTEROP
attrs = typeof (Class2).GetField ("f3").GetCustomAttributes (true);
Assert.AreEqual (1, attrs.Length, "#F1");
attr = (MarshalAsAttribute) attrs [0];
-#if FEATURE_COMINTEROP
Assert.AreEqual (UnmanagedType.CustomMarshaler, attr.Value, "#F2");
-#endif
+
Assert.AreEqual ("5", attr.MarshalCookie, "#F3");
Assert.AreEqual (typeof (Marshal1), Type.GetType (attr.MarshalType), "#F4");
attrs = typeof (Class3).GetField ("f3").GetCustomAttributes (false);
Assert.AreEqual (1, attrs.Length, "#G1");
attr = (MarshalAsAttribute) attrs [0];
-#if FEATURE_COMINTEROP
Assert.AreEqual (UnmanagedType.CustomMarshaler, attr.Value, "#G2");
-#endif
Assert.AreEqual ("5", attr.MarshalCookie, "#G3");
Assert.AreEqual (typeof (Marshal1), Type.GetType (attr.MarshalType), "#G4");
attrs = typeof (Class3).GetField ("f3").GetCustomAttributes (true);
Assert.AreEqual (1, attrs.Length, "#H1");
attr = (MarshalAsAttribute) attrs [0];
-#if FEATURE_COMINTEROP
Assert.AreEqual (UnmanagedType.CustomMarshaler, attr.Value, "#H2");
-#endif
Assert.AreEqual ("5", attr.MarshalCookie, "#H3");
Assert.AreEqual (typeof (Marshal1), Type.GetType (attr.MarshalType), "#H4");
attrs = typeof (Class2).GetField ("f3").GetCustomAttributes (true);
Assert.AreEqual (1, attrs.Length, "#I1");
attr = (MarshalAsAttribute) attrs [0];
-#if FEATURE_COMINTEROP
Assert.AreEqual (UnmanagedType.CustomMarshaler, attr.Value, "#I2");
-#endif
Assert.AreEqual ("5", attr.MarshalCookie, "#I3");
Assert.AreEqual (typeof (Marshal1), Type.GetType (attr.MarshalType), "#I4");
+#endif
}
// Disable "field not used warning", this is intended.
}
[Test]
+ [Category ("MobileNotWorking")]
[ExpectedException (typeof (BadImageFormatException))]
public void ConstructorString_Bad ()
{
}
[Test]
+#if MONOTOUCH
+ [ExpectedException (typeof (NotSupportedException))]
+#endif
public void MakeGenericType_NestedUserDefinedType ()
{
Type ut = new UserType (new UserType (typeof (int)));
}
[Test]
+#if MONOTOUCH
+ [ExpectedException (typeof (NotSupportedException))]
+#endif
public void TestMakeGenericType_UserDefinedType_DotNet20SP1 ()
{
Type ut = new UserType(typeof(int));