Tests update for mobile profile
authorMarek Safar <marek.safar@gmail.com>
Fri, 1 Mar 2013 14:30:59 +0000 (15:30 +0100)
committerMarek Safar <marek.safar@gmail.com>
Fri, 1 Mar 2013 14:31:25 +0000 (15:31 +0100)
25 files changed:
mcs/class/Mono.Security/Test/Mono.Math/ArithmeticBigTest.cs
mcs/class/Mono.Security/Test/Mono.Math/SearchGeneratorTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Authenticode/AuthenticodeDeformatterTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Authenticode/PrivateKeyTest.cs
mcs/class/Mono.Security/Test/Mono.Security.Authenticode/SoftwarePublisherCertificateTest.cs
mcs/class/Mono.Security/Test/Mono.Security/StrongNameTest.cs
mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs
mcs/class/System.Net.Http/Test/System.Net.Http/StringContentTest.cs
mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs
mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs
mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs
mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs
mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs
mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XAttributeTest.cs
mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
mcs/class/System.Xml.Linq/Test/System.Xml.Schema/ExtensionsTest.cs

index 94ff296ced511a8752575675a1f99ad0b4eed515..ac05640807f2a6103de0a821deaaeead985de730 100644 (file)
@@ -179,48 +179,48 @@ namespace MonoTests.Mono.Math.Arithmetic.Big {
                [Test]
                public void AgtB () 
                {
-                       Assertion.Assert(A > B);
+                       Assert.IsTrue(A > B);
                }
                
                [Test]
                public void ANotLtB () 
                {
-                       Assertion.Assert(!(A < B));
+                       Assert.IsTrue(!(A < B));
                }
                
                [Test]
                public void BNotGtA () 
                {
-                       Assertion.Assert(!(B > A));
+                       Assert.IsTrue(!(B > A));
                }
                
                [Test]
                public void AltB () 
                {
-                       Assertion.Assert(B < A);
+                       Assert.IsTrue(B < A);
                }
                
                [Test]
                public void AeqA () 
                {
-                       Assertion.Assert(A == A);
+                       Assert.AreEqual(A, A);
                }
                [Test]
                public void BeqB () 
                {
-                       Assertion.Assert(B == B);
+                       Assert.AreEqual(B, B);
                }
                
                [Test]
                public void AneqB () 
                {
-                       Assertion.Assert(A != B);
+                       Assert.AreNotEqual(A, B);
                }
                
                [Test]
                public void BneqA () 
                {
-                       Assertion.Assert(B != A);
+                       Assert.AreNotEqual(B, A);
                }
 
                #endregion
index 189dbd9d0dff051a6116f6309f3139e259975a63..80434f9983ca1dd3296fe96cfdfbdf61372dc34f 100644 (file)
@@ -62,7 +62,7 @@ namespace MonoTests.Mono.Math {
                        for (int i = 0; i < 5; i++) {
                                ContextData ctx = new ContextData (128, (uint)r.Next (int.MinValue, int.MaxValue));
                                BigInteger p = GenerateNewPrime (128, ctx);
-                               Assertion.Assert (p.TestBit (1));
+                               Assert.IsTrue (p.TestBit (1));
                                uint d = ctx.testData;
                                for (uint j = 128 - 2; d > 0; j--, d >>= 1)
                                        Assertion.AssertEquals ((d&1) == 1, p.TestBit (j));
index d15087aef00469515cde84a97af6d6353d6189cb..0a1fd9f3d1a6237b8fca130e7c56838c301fdd34 100644 (file)
@@ -678,7 +678,7 @@ namespace MonoTests.Mono.Security.Authenticode {
 
                private string WriteFile () 
                {
-                       string filename = "helloworld_signed.exe";
+                       string filename = Path.Combine (Path.GetTempPath (), "helloworld_signed.exe");
                        try {
                                if (File.Exists (filename)) {
                                        File.Delete (filename);
index ee8145cff6b7cc28d86819aec04382807e114bfc..0f529496e1183d56568e8535ed5a0f53a4aa9629 100644 (file)
@@ -96,7 +96,13 @@ public class PrivateKeyTest : Assertion {
                Assert (msg, a);
        }
 
-       private const string testfile = "test.pvk";
+       string testfile;
+               
+       [TestFixtureSetUp]
+       public void FixtureSetup ()
+       {
+               testfile = Path.Combine (Path.GetTempPath (), "test.pvk");
+       }
 
        [TearDown]
        public void TearDown () 
index 6e6adce2b8690beefce487b448dce2092564b07e..11136a489046ed966fc960e910d260ae77a1327f 100644 (file)
@@ -381,7 +381,13 @@ namespace MonoTests.Mono.Security.Authenticode {
                0x77, 0xEF, 0xEC, 0x17, 0x92, 0xC7, 0xD6, 0xCD, 0xE1, 0x2A, 0x2E, 0xE7, 
                0xF3, 0xED, 0x7F, 0x66, 0x86, 0x31, 0x00 };
        
-               private const string testfile = "test.spc";
+               string testfile;
+
+               [TestFixtureSetUp]
+               public void FixtureSetup ()
+               {
+                       testfile = Path.Combine (Path.GetTempPath (), "test.spc");
+               }
        
                [TearDown]
                public void TearDown () 
@@ -397,11 +403,11 @@ namespace MonoTests.Mono.Security.Authenticode {
                                if (unicode) {
                                        data = Encoding.Unicode.GetBytes (s);
                                } else if (pem) {
-                                       string b64pem = "-----BEGIN PKCS7-----\n" + s + "\n-----END PKCS7-----";
-                                       data = Encoding.ASCII.GetBytes (b64pem);
-                       using (FileStream fs = File.Create ("bad.pem")) {
-                               fs.Write (data, 0, data.Length);
-                       }
+                                       //string b64pem = "-----BEGIN PKCS7-----\n" + s + "\n-----END PKCS7-----";
+                                       //data = Encoding.ASCII.GetBytes (b64pem);
+                                       //using (FileStream fs = File.Create ("bad.pem")) {
+                                       //      fs.Write (data, 0, data.Length);
+                                       //}
                                } else {
                                        data = Encoding.ASCII.GetBytes (s);
                                }
index 43bc7a5fbb9b0bdbfb8fb3cb522d93d07fd1ea80..05e013cd4aa2a26d7080df77256a51e636311396 100644 (file)
@@ -127,8 +127,8 @@ namespace MonoTests.Mono.Security {
                        AssertEquals ("key.PublicKeyToken", sn1.PublicKeyToken, sn2.PublicKeyToken);
                }
 
-               private const string Signed = "hellosigned.exe";
-               private const string Delay = "hellodelay.exe";
+               string Signed;
+               string Delay;
                private StrongName sn;
                private static byte[] signedData = {
                        0x4D, 0x5A, 0x90, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 
@@ -787,11 +787,16 @@ namespace MonoTests.Mono.Security {
                [SetUp]
                public void SetUp () 
                {
+                       Signed = Path.Combine (Path.GetTempPath (), "hellosigned.exe");
+                       Delay = Path.Combine (Path.GetTempPath (), "hellodelay.exe");
+
                        sn = new StrongName (key);
                        // write hellosigned.exe to disk
                        FileStream fs = File.OpenWrite (Signed);
                        fs.Write (signedData, 0, signedData.Length);
                        fs.Close ();
+
+
                        // write hellodelay.exe to disk
                        fs = File.OpenWrite (Delay);
                        fs.Write (delayData, 0, delayData.Length);
index c5a8dc430ad05bf505fd3182bae3a5cb8916db75..6651be4a64fac113d36b852cf72cbec8efe32fa4 100644 (file)
@@ -525,7 +525,7 @@ namespace MonoTests.System.Net.Http
                                        client.SendAsync (request, HttpCompletionOption.ResponseContentRead).Wait (WaitTimeout);
                                        Assert.Fail ("#2");
                                } catch (AggregateException e) {
-                                       Assert.IsInstanceOfType (typeof (HttpRequestException), e.InnerException, "#3");
+                                       Assert.IsTrue (e.InnerException is HttpRequestException, "#3");
                                }
 
                        } finally {
@@ -699,7 +699,7 @@ namespace MonoTests.System.Net.Http
                                        client.GetByteArrayAsync (LocalServer).Wait (WaitTimeout);
                                        Assert.Fail ("#1");
                                } catch (AggregateException e) {
-                                       Assert.IsInstanceOfType (typeof (HttpRequestException), e.InnerException, "#2");
+                                       Assert.IsTrue (e.InnerException is HttpRequestException , "#2");
                                }
                        } finally {
                                listener.Close ();
@@ -726,7 +726,7 @@ namespace MonoTests.System.Net.Http
                                        client.GetStringAsync (LocalServer).Wait (WaitTimeout);
                                        Assert.Fail ("#1");
                                } catch (AggregateException e) {
-                                       Assert.IsInstanceOfType (typeof (HttpRequestException), e.InnerException, "#2");
+                                       Assert.IsTrue (e.InnerException is HttpRequestException, "#2");
                                }
                        } finally {
                                listener.Abort ();
index b4a541afab286291a3e2d2a026354002f25a4315..edd4b839c164c1e7d638067ac367a3dfa2dc3ecf 100644 (file)
@@ -331,7 +331,7 @@ namespace MonoTests.System.Net.Http
                                Assert.IsTrue (sc.LoadIntoBufferAsync (50).Wait (200));
                                Assert.Fail ("#1");
                        } catch (AggregateException e) {
-                               Assert.IsInstanceOfType (typeof (HttpRequestException), e.InnerException, "#2");
+                               Assert.IsTrue (e.InnerException is HttpRequestException, "#2");
                        }
                }
 
index 51a077176b8d470b80b24ef6397f4b3c02e91b56..f031fc3ea8eb9ef10a863e023744cb0efdc76cc2 100644 (file)
@@ -61,9 +61,10 @@ namespace MonoTests.System.Net.Http
 
                        var s = new StringContent ("aaa", null, "multipart/*");
                        Assert.AreEqual ("Content-Type: multipart/*; charset=utf-8\r\n", s.Headers.ToString ());
-
+#if !MOBILE
                        s = new StringContent ("aaa", Encoding.GetEncoding (852), "multipart/*");
                        Assert.AreEqual ("Content-Type: multipart/*; charset=ibm852\r\n", s.Headers.ToString ());
+#endif
                }
 
                [Test]
index 0e91387a4be8b56b45dc91d13fcf5feced7fd086..779c8bd1e1ea3de3d279be722c5b3c4ba63d7c23 100644 (file)
@@ -173,6 +173,7 @@ namespace MonoTests.System.Xml
                }
 
                [Test]
+               [Category ("MobileNotWorking")]
                public void TestSimpleMutualImport ()
                {
                        XmlReader r = new XmlTextReader ("Test/XmlFiles/xsd/inter-inc-1.xsd");
index 718e62c1fff361c4039a7a084ef1308ca9f5b2a2..20b0d5dbaf8697afee0e02498b3dfaaca31f71d7 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
+#if !MOBILE
 
 using System;
 using System.CodeDom;
index 5b8d9de6dcc3c6dbeb7bd8540262cdb8493e5848..7311fbb27e8ea4566730306f8ed9fb9acc66c1d8 100644 (file)
@@ -28,7 +28,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
+#if !MOBILE
 
 using System;
 using System.CodeDom;
index 9f0e019113573d4e3992a88d1a31fcf36fdc16d8..b1c7597c150962efc3b53344b5d894c2ba615993 100644 (file)
@@ -7,6 +7,8 @@
 // (C) 2005 Novell
 // 
 
+#if !MOBILE
+
 using System;
 using System.Collections;
 using System.Globalization;
@@ -1159,3 +1161,5 @@ namespace MonoTests.System.XmlSerialization
                }
        }
 }
+
+#endif
\ No newline at end of file
index 25a1ecf74bfdaacb1c357445bc5529916a7ca99a..91f0ed1d2826029b5022570b568de0c65eeb3f76 100644 (file)
@@ -8,6 +8,8 @@
 // (C) 2006 Novell
 // 
 
+#if !MOBILE
+
 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;
@@ -1304,3 +1306,5 @@ namespace MonoTests.System.XmlSerialization
                }
        }
 }
+
+#endif
index f8713258a0f20f9095fb06c1801a612c27f10b3f..fc55852869da82e5aaa0c3273a4f12edf38665a2 100644 (file)
@@ -1783,11 +1783,9 @@ namespace MonoTests.System.XmlSerialization
                [Test]
 #if NET_2_0
                [Category ("NotWorking")] // support for XmlSchemaProvider is not implemented
-#else
-               [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn
 #endif
                public void ExportXmlSerializable_SchemaProvider1 () {
-                       XmlSchemas schemas = schemas = Export (typeof (PrimitiveSchemaProvider));
+                       XmlSchemas schemas = Export (typeof (PrimitiveSchemaProvider));
                        Assert.AreEqual (1, schemas.Count, "#1");
 
                        StringWriter sw = new StringWriter ();
index 809586676392ccad696605b341eda574aebe5655..fe4838cb2e9d8184999494e9a45d2809f8550f8f 100644 (file)
@@ -39,8 +39,9 @@ using System.IO;
 using System.Xml;
 using System.Xml.Schema;
 using System.Xml.Serialization;
+#if !MOBILE
 using Microsoft.CSharp;
-
+#endif
 using NUnit.Framework;
 
 using MonoTests.System.Xml.TestClasses;
@@ -891,6 +892,8 @@ namespace MonoTests.System.Xml.Serialization
                        Assert.AreEqual ("UInt16", map.TypeName, "#6");
                }
 
+#if !MOBILE
+
                [Test]
                public void ImportTypeMapping_EnumSimpleContent ()
                {
@@ -1075,30 +1078,6 @@ namespace MonoTests.System.Xml.Serialization
                        return null;
                }
 
-               private static XmlSchemas ExportType (Type type)
-               {
-                       XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name);
-                       XmlSchemas schemas = new XmlSchemas ();
-                       XmlSchemaExporter sx = new XmlSchemaExporter (schemas);
-                       XmlTypeMapping tm = ri.ImportTypeMapping (type);
-                       sx.ExportTypeMapping (tm);
-                       return schemas;
-               }
-
-               private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas)
-               {
-                       ArrayList qnames = new ArrayList ();
-
-                       foreach (XmlSchema schema in schemas) {
-                               if (!schema.IsCompiled) schema.Compile (null);
-                               foreach (XmlSchemaObject ob in schema.Items)
-                                       if (ob is XmlSchemaElement)
-                                               qnames.Add (((XmlSchemaElement) ob).QualifiedName);
-                       }
-
-                       return qnames;
-               }
-
                [Test]
                [ExpectedException (typeof (InvalidOperationException))]
                public void ImportTypeMappingNonExistent ()
@@ -1238,5 +1217,31 @@ namespace MonoTests.System.Xml.Serialization
                                xss.Add (XmlSchema.Read (new XmlTextReader (new StringReader (xsd)), null));
                        return new XmlSchemaImporter (xss);
                }
+
+#endif
+
+               private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas)
+               {
+                       ArrayList qnames = new ArrayList ();
+                       
+                       foreach (XmlSchema schema in schemas) {
+                               if (!schema.IsCompiled) schema.Compile (null);
+                               foreach (XmlSchemaObject ob in schema.Items)
+                                       if (ob is XmlSchemaElement)
+                                               qnames.Add (((XmlSchemaElement) ob).QualifiedName);
+                       }
+                       
+                       return qnames;
+               }
+
+               private static XmlSchemas ExportType (Type type)
+               {
+                       XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name);
+                       XmlSchemas schemas = new XmlSchemas ();
+                       XmlSchemaExporter sx = new XmlSchemaExporter (schemas);
+                       XmlTypeMapping tm = ri.ImportTypeMapping (type);
+                       sx.ExportTypeMapping (tm);
+                       return schemas;
+               }
        }
 }
index a7f00ab1e24e084243c71cb2ad5424f4c35c12cf..ed63ede99faa074613c70514f6c53e6309fb5680 100644 (file)
@@ -2187,8 +2187,7 @@ namespace MonoTests.System.XmlSerialization
                        ser.Deserialize (new XmlTextReader (xml, XmlNodeType.Document, null));
                }
 
-#if NET_2_0
-#if !TARGET_JVM
+#if !TARGET_JVM && !MOBILE
                [Test]
                public void GenerateSerializerGenerics ()
                {
@@ -2266,7 +2265,6 @@ namespace MonoTests.System.XmlSerialization
                        Assert.AreEqual (TestEnumWithNulls.bb, w.nenum.Value);
                        Assert.AreEqual (t, w.ndate.Value);
                }
-#endif
 
                [Test]
                public void SerializeBase64Binary()
index 4df96725fbbd89e28d518da58925e600cb628ef0..657d672e5bcc69e7cd7e1f14263c40479ddfd0c8 100644 (file)
@@ -18,11 +18,6 @@ namespace MonoTests.System.Xml
        [TestFixture]\r
        public class XmlDocumentEventTests\r
        {\r
-               public static void Main ()\r
-               {\r
-                       new XmlDocumentEventTests ().InsertingOrder ();\r
-               }\r
-\r
                private StringBuilder eventLogBuilder = new StringBuilder ();\r
 \r
                private XmlDocument GetEventDocument ()\r
index d8035e4d010af8d219ff81459e409a0652f83ee2..52de90d1414348ee23777ff29d52173e789c3237 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !MOBILE
+
 using NUnit.Framework;
 
 using System;
@@ -82,3 +84,5 @@ namespace MonoCasTests.System.Xml {
                }
        }
 }
+
+#endif
\ No newline at end of file
index 0603a694d4273d5a371a769fe8eb70085f42b9e2..c97407de984b032cb072d58e56720f1abf150171 100644 (file)
@@ -8,6 +8,8 @@
 // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
 //
 
+#if !MOBILE
+
 using System;
 using System.Collections;
 using System.IO;
@@ -132,3 +134,4 @@ namespace MonoTestsXml
        }
 }
 
+#endif
index 17e94fc1567758c152a34016227c4fac5c31660a..59752547bc0d07fccaaa14c8a112e28ede063a73 100644 (file)
@@ -104,19 +104,17 @@ namespace MonoTests.System.Xml
 \r
 #if NET_4_5\r
                [Test]\r
-               [Category("Async")]\r
                public void TestAsync ()\r
                {\r
                        var loc = Assembly.GetExecutingAssembly ().Location;\r
                        Uri resolved = resolver.ResolveUri (null, loc);\r
                        Assert.AreEqual ("file", resolved.Scheme);\r
                        var task = resolver.GetEntityAsync (resolved, null, typeof (Stream));\r
-                       Assert.That (task.Wait (3000));\r
-                       Assert.IsInstanceOfType (typeof (Stream), task.Result);\r
+                       Assert.IsTrue (task.Wait (3000));\r
+                       Assert.IsTrue (task.Result is Stream);\r
                }\r
 \r
                [Test]\r
-               [Category("Async")]\r
                public void TestAsyncError ()\r
                {\r
                        var loc = Assembly.GetExecutingAssembly ().Location;\r
@@ -129,7 +127,7 @@ namespace MonoTests.System.Xml
                        } catch (Exception ex) {\r
                                if (ex is AggregateException)\r
                                        ex = ((AggregateException) ex).InnerException;\r
-                               Assert.IsInstanceOfType (typeof (XmlException), ex);\r
+                               Assert.IsTrue (ex is XmlException);\r
                        }\r
                }\r
 #endif\r
index 6ade78b4461aa4b8413061c140875c8dacce60ff..bd5cb6af26f978537a65a49360b5316f43cb4258 100644 (file)
@@ -47,6 +47,7 @@ namespace MonoTests.System.Xml
                }
 
                [Test]
+               [Category ("MobileNotWorking")]
                public void EncodingTest ()
                {
                        // For Stream it makes sense
index 15bad621e9c584a1ab0d8fb4181d47db339fa8c7..7d1e8302b68fd41e5734213560bf68b3d0b0c9a0 100644 (file)
@@ -451,7 +451,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.IsNotNull ((double?) new XAttribute (m), "m:double?:null");
                        Assert.AreEqual (double.NegativeInfinity, ((double?) new XAttribute (m)).Value, "m:double?:value");
                        Assert.IsNotNull ((double?) new XAttribute (n), "n:double?:null");
-                       Assert.IsNaN (((double?) new XAttribute (n)).Value, "n:double?:value");
+                       Assert.AreEqual (double.NaN, ((double?) new XAttribute (n)).Value, "n:double?:value");
                        Assert.IsNotNull ((float?) new XAttribute (a), "a:float?:null");
                        Assert.AreEqual (7f, ((float?) new XAttribute (a)).Value, "a:float?:value");
                        Assert.IsNotNull ((float?) new XAttribute (b), "b:float?:null");
@@ -473,7 +473,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.IsNotNull ((float?) new XAttribute (m), "m:float?:null");
                        Assert.AreEqual (float.NegativeInfinity, ((float?) new XAttribute (m)).Value, "m:float?:value");
                        Assert.IsNotNull ((float?) new XAttribute (n), "n:float?:null");
-                       Assert.IsNaN (((float?) new XAttribute (n)).Value, "n:float?:value");
+                       Assert.AreEqual (float.NaN, ((float?) new XAttribute (n)).Value, "n:float?:value");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (a); }, "a:Guid?");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (b); }, "b:Guid?");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XAttribute (c); }, "c:Guid?");
@@ -629,7 +629,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.AreEqual (double.PositiveInfinity, (double) new XAttribute (i), "i:double");
                        Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute (M), "M:double");
                        Assert.AreEqual (double.NegativeInfinity, (double) new XAttribute (m), "m:double");
-                       Assert.IsNaN (((double) new XAttribute (n)), "n:double");
+                       Assert.AreEqual (double.NaN, ((double) new XAttribute (n)), "n:double");
                        Assert.AreEqual (7f, (float) new XAttribute (a), "a:float");
                        Assert.AreEqual (42f, (float) new XAttribute (b), "b:float");
                        Assert.AreEqual (123f, (float) new XAttribute (c), "c:float");
@@ -640,7 +640,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.AreEqual (float.PositiveInfinity, (float) new XAttribute (i), "i:float");
                        Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute (M), "M:float");
                        Assert.AreEqual (float.NegativeInfinity, (float) new XAttribute (m), "m:float");
-                       Assert.IsNaN (((float) new XAttribute (n)), "n:float");
+                       Assert.AreEqual (float.NaN, ((float) new XAttribute (n)), "n:float");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (a); }, "a:Guid");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (b); }, "b:Guid");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XAttribute (c); }, "c:Guid");
index 59a3854316448cd5382f8638274399b305a9987e..5a5f255094c74c579df300882bd87538267d25e7 100644 (file)
@@ -907,7 +907,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.IsNotNull ((double?) new XElement (m), "m:double?:null");
                        Assert.AreEqual (double.NegativeInfinity, ((double?) new XElement (m)).Value, "m:double?:value");
                        Assert.IsNotNull ((double?) new XElement (n), "n:double?:null");
-                       Assert.IsNaN (((double?) new XElement (n)).Value, "n:double?:value");
+                       Assert.AreEqual (double.NaN, ((double?) new XElement (n)).Value, "n:double?:value");
                        Assert.IsNotNull ((float?) new XElement (a), "a:float?:null");
                        Assert.AreEqual (7f, ((float?) new XElement (a)).Value, "a:float?:value");
                        Assert.IsNotNull ((float?) new XElement (b), "b:float?:null");
@@ -929,7 +929,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.IsNotNull ((float?) new XElement (m), "m:float?:null");
                        Assert.AreEqual (float.NegativeInfinity, ((float?) new XElement (m)).Value, "m:float?:value");
                        Assert.IsNotNull ((float?) new XElement (n), "n:float?:null");
-                       Assert.IsNaN (((float?) new XElement (n)).Value, "n:float?:value");
+                       Assert.AreEqual (float.NaN, ((float?) new XElement (n)).Value, "n:float?:value");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (a); }, "a:Guid?");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (b); }, "b:Guid?");
                        AssertThrows<FormatException> (() => { Guid? z = (Guid?) new XElement (c); }, "c:Guid?");
@@ -1085,7 +1085,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.AreEqual (double.PositiveInfinity, (double) new XElement (i), "i:double");
                        Assert.AreEqual (double.NegativeInfinity, (double) new XElement (M), "M:double");
                        Assert.AreEqual (double.NegativeInfinity, (double) new XElement (m), "m:double");
-                       Assert.IsNaN (((double) new XElement (n)), "n:double");
+                       Assert.AreEqual (double.NaN, ((double) new XElement (n)), "n:double");
                        Assert.AreEqual (7f, (float) new XElement (a), "a:float");
                        Assert.AreEqual (42f, (float) new XElement (b), "b:float");
                        Assert.AreEqual (13f, (float) new XElement (c), "c:float");
@@ -1096,7 +1096,7 @@ namespace MonoTests.System.Xml.Linq
                        Assert.AreEqual (float.PositiveInfinity, (float) new XElement (i), "i:float");
                        Assert.AreEqual (float.NegativeInfinity, (float) new XElement (M), "M:float");
                        Assert.AreEqual (float.NegativeInfinity, (float) new XElement (m), "m:float");
-                       Assert.IsNaN (((float) new XElement (n)), "n:float");
+                       Assert.AreEqual (float.NaN, ((float) new XElement (n)), "n:float");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (a); }, "a:Guid");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (b); }, "b:Guid");
                        AssertThrows<FormatException> (() => { Guid z = (Guid) new XElement (c); }, "c:Guid");
index 2ed1b5dedb6a0133abb73186735273d57dba289f..da577e644effc0f851c9617fa46466d4140a3c4a 100644 (file)
@@ -9,6 +9,8 @@
 // (C) Stefan Prutianu
 // 
 
+#if !MOBILE
+
 using NUnit.Framework;
 using System;
 using System.Xml;
@@ -467,3 +469,5 @@ namespace MonoTests.System.Xml.Schema
 
        }
 }
+
+#endif
\ No newline at end of file