Mark tests as not working under TARGET_JVM
authorEyal Alalouf <eyala@mainsoft.com>
Wed, 14 Mar 2007 10:47:05 +0000 (10:47 -0000)
committerEyal Alalouf <eyala@mainsoft.com>
Wed, 14 Mar 2007 10:47:05 +0000 (10:47 -0000)
svn path=/trunk/mcs/; revision=74246

34 files changed:
mcs/class/corlib/Test/ChangeLog
mcs/class/corlib/Test/Mscorlib.Test20.csproj
mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs
mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs
mcs/class/corlib/Test/System.Collections/HashtableTest.cs
mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs [new file with mode: 0644]
mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs
mcs/class/corlib/Test/System.IO/BinaryReaderTest.cs
mcs/class/corlib/Test/System.IO/BinaryWriterTest.cs
mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs
mcs/class/corlib/Test/System.IO/DirectoryTest.cs
mcs/class/corlib/Test/System.IO/FileInfoTest.cs
mcs/class/corlib/Test/System.IO/FileStreamTest.cs
mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs
mcs/class/corlib/Test/System.IO/FileTest.cs
mcs/class/corlib/Test/System.IO/PathTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
mcs/class/corlib/Test/System.Text/EncodingInfoTest.cs
mcs/class/corlib/Test/System.Threading/MutexTest.cs
mcs/class/corlib/Test/System/ActivatorTest.cs
mcs/class/corlib/Test/System/AppDomainSetupTest.cs
mcs/class/corlib/Test/System/ArrayTest.cs
mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs
mcs/class/corlib/Test/System/ConvertTest.cs
mcs/class/corlib/Test/System/DecimalTest.cs
mcs/class/corlib/Test/System/DecimalTest2.cs
mcs/class/corlib/Test/System/TimeZoneTest.cs
mcs/class/corlib/Test/System/TypeTest.cs

index dbca6f93afbf920096f8032727edaa06e21ba0c7..631a60b5c0f3350c4527d1d3737391159751fff2 100644 (file)
@@ -1,8 +1,12 @@
-200703-05   Eyal Alaluf <eyala@mainsoft.com>
+2007-03-14  Eyal Alaluf <eyala@mainsoft.com>
+
+       * Mark tests as not working under TargetJvm
+
+2007-03-05     Eyal Alaluf <eyala@mainsoft.com>
 
        * Port tests to run under TARGET_JVM.
 
-200703-05      Roei Erez <roeie@mainsoft.com>
+2007-03-05     Roei Erez <roeie@mainsoft.com>
 
        * StringTest.cs: add test for string properties.
 
index 24ce8488bcbaa6f716388822ee1b146a3fd55e36..78f2b2846c180d188f1c395817a56638952f3bb2 100644 (file)
     <Reference Include="System.Data" />\r
     <Reference Include="System.Runtime.Remoting" />\r
     <Reference Include="System.Xml" />\r
+    <Reference Include="J2SE.Helpers" >\r
+         <HintPath>..\..\lib\J2SE.Helpers.dll</HintPath>\r
+         <Private>False</Private>\r
+       </Reference>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Content Include="resources\AFile.txt" />\r
@@ -89,7 +93,7 @@
     <Compile Include="System.Collections\SortedListTest.cs" />\r
     <Compile Include="System.Collections\StackTest.cs" />\r
     <Compile Include="System.Globalization\CalendarTest.cs" />\r
-    <Compile Include="System.Globalization\CompareInfoTest.cs" />\r
+    <Compile Include="System.Globalization\CompareInfoTest.jvm.cs" />\r
     <Compile Include="System.Globalization\CultureInfoTest.cs" />\r
     <Compile Include="System.Globalization\DateTimeFormatInfoTest.cs" />\r
     <Compile Include="System.Globalization\DaylightTimeTest.cs" />\r
     <Compile Include="System.Text\EncoderReplacementFallbackBufferTest.cs" />\r
     <Compile Include="System.Text\EncoderReplacementFallbackTest.cs" />\r
     <Compile Include="System.Text\EncoderTest.cs" />\r
+    <Compile Include="System.Text\EncodingTest.cs" />\r
     <Compile Include="System.Text\EncodingInfoTest.cs" />\r
     <Compile Include="System.Text\StringBuilderTest.cs" />\r
     <Compile Include="System.Text\TestEncoding.cs" />\r
index 09e12a9eb794c806cb6b005b1a4d59612e7af122..95f034bb5b9fb01b29219eccd6b305fd9dbb9fdf 100644 (file)
@@ -543,6 +543,7 @@ namespace MonoTests.System.Collections.Generic {
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")] // BUGBUG Very very slow on TARGET_JVM.
                public void SerializationTest()
                {
                        for (int i = 0; i < 50; i++)
index fde491bf91e1835f3f49c79fc72da250b61cf619..a6951d9fe6ccb24f640e32c37a3d7ee92dff03ea 100644 (file)
@@ -321,6 +321,7 @@ namespace MonoTests.System.Collections.Generic {
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void SerializeTest ()
                {
                        List <int> list = new List <int> ();
@@ -328,7 +329,11 @@ namespace MonoTests.System.Collections.Generic {
                        list.Add (0);
                        list.Add (7);
 
+#if TARGET_JVM
+                       BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
                        BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
                        MemoryStream ms = new MemoryStream ();
                        bf.Serialize (ms, list);
 
@@ -340,13 +345,18 @@ namespace MonoTests.System.Collections.Generic {
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void DeserializeTest ()
                {
                        MemoryStream ms = new MemoryStream ();
                        ms.Write (_serializedList, 0, _serializedList.Length);
                        ms.Position = 0;
 
+#if TARGET_JVM
+                       BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
                        BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
                        List<int> list = (List<int>) bf.Deserialize (ms);
                        Assert.AreEqual (3, list.Count, "#1");
                        Assert.AreEqual (5, list [0], "#2");
index a810cf66bdceb86aba9c979b29f343cf42c5f829..7343d5158781edffb2bf78c1184215b4ae2cd697 100644 (file)
@@ -138,9 +138,6 @@ namespace MonoTests.System.Collections {
                };
 
                [Test]
-#if TARGET_JVM
-               [Category("NotWorking")]
-#endif
                public void SerializationRoundtrip ()
                {
                        CaseInsensitiveHashCodeProvider enus = new CaseInsensitiveHashCodeProvider (new CultureInfo ("en-US"));
@@ -155,12 +152,13 @@ namespace MonoTests.System.Collections {
                }
 
                [Test]
-#if TARGET_JVM
-               [Category ("NotWorking")]
-#endif
                public void Deserialize ()
                {
+#if TARGET_JVM
+                       BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
                        BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
 
                        MemoryStream ms = new MemoryStream (serialized_en_us);
                        CaseInsensitiveHashCodeProvider enus = (CaseInsensitiveHashCodeProvider) bf.Deserialize (ms);
index 2db98b7dc8dccaa6c563bfcddb0c6636303cc620..e8c364ae5004468cb9ffcdb9ce34a5a1376182af 100644 (file)
@@ -411,9 +411,6 @@ public class HashtableTest : Assertion {
        }\r
 \r
         [Test]\r
-#if TARGET_JVM\r
-       [Category ("NotWorking")]\r
-#endif\r
        public void TestCopyTo() {\r
                {\r
                        bool errorThrown = false;\r
@@ -502,6 +499,13 @@ public class HashtableTest : Assertion {
                        h['b'] = 2;\r
                        DictionaryEntry[] o = new DictionaryEntry[2];\r
                        h.CopyTo(o,0);\r
+#if TARGET_JVM // Hashtable is not an ordered collection!\r
+                       if (o[0].Key.Equals('b')) {\r
+                               DictionaryEntry v = o[0];\r
+                               o[0] = o[1];\r
+                               o[1] = v;\r
+                       }\r
+#endif // TARGET_JVM\r
                        AssertEquals("first copy fine.", 'a', o[0].Key);\r
                        AssertEquals("first copy fine.", 1, o[0].Value);\r
                        AssertEquals("second copy fine.", 'b', o[1].Key);\r
@@ -533,25 +537,23 @@ public class HashtableTest : Assertion {
        public void TestSerialization () {\r
                Hashtable table1 = new Hashtable();\r
                Hashtable table2;\r
-               Stream str = new MemoryStream ();
+               Stream str = new MemoryStream ();\r
                BinaryFormatter formatter = new BinaryFormatter();\r
 \r
                for (int i = 0; i < 100; i++)\r
-                       table1[i] = "TestString Key: " + i.ToString();
-               
-               formatter.Serialize (str, table1);
-               str.Position = 0;
-               table2 = (Hashtable) formatter.Deserialize (str);
+                       table1[i] = "TestString Key: " + i.ToString();\r
+               \r
+               formatter.Serialize (str, table1);\r
+               str.Position = 0;\r
+               table2 = (Hashtable) formatter.Deserialize (str);\r
                \r
                bool result;\r
-               foreach (DictionaryEntry de in table1)
+               foreach (DictionaryEntry de in table1)\r
                        AssertEquals (de.Value, table2 [de.Key]);\r
        }\r
        \r
        [Test]\r
-#if TARGET_JVM\r
-       [Category ("NotWorking")]\r
-#endif\r
+       [Category ("TargetJvmNotWorking")]\r
        public void TestSerialization2 () {\r
                // Test from bug #70570\r
                MemoryStream stream = new MemoryStream();\r
diff --git a/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs b/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs
new file mode 100644 (file)
index 0000000..8b3d145
--- /dev/null
@@ -0,0 +1,690 @@
+// CompareInfoTest.cs - NUnit Test Cases for the
+// System.Globalization.CompareInfo class
+//
+// Dick Porter <dick@ximian.com>
+// Atsushi Enomoto <atsushi@ximian.com>
+//
+// (C) 2003-2005 Novell, Inc.  http://www.novell.com
+//
+
+using NUnit.Framework;
+using System;
+using System.Globalization;
+
+namespace MonoTests.System.Globalization
+{
+
+[TestFixture]
+public class CompareInfoTest : Assertion
+{
+       static bool doTest = Environment.GetEnvironmentVariable ("MONO_DISABLE_MANAGED_COLLATION") != "yes";
+
+       public CompareInfoTest() {}
+
+       [Test]
+       public void Compare()
+       {
+               string s1 = "foo";
+               
+               AssertEquals ("Compare two empty strings", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", ""));
+               AssertEquals ("Compare string with empty string", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, ""));
+               AssertEquals ("Compare empty string with string", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", s1));
+
+               AssertEquals ("Compare two empty strings, with 0 offsets", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "", 0));
+               AssertEquals ("Compare string with empty string, with 0 offsets", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, "", 0));
+               AssertEquals ("Compare empty string with string, with 0 offsets", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, s1, 0));
+
+               AssertEquals ("Compare two empty strings, with 0 offsets and specified lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, "", 0, "".Length));
+               AssertEquals ("Compare string with empty string, with 0 offsets and specified lengths", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, "", 0, "".Length));
+               AssertEquals ("Compare empty string with string, with 0 offsets and specified lengths", -1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, s1, 0, s1.Length));
+
+               AssertEquals ("Compare two strings, with offsets == string lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, s1.Length));
+               AssertEquals ("Compare two strings, with first offset == string length", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, 0));
+               AssertEquals ("Compare two strings, with second offset == string length", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1, s1.Length));
+
+               AssertEquals ("Compare two strings, with zero lengths", 0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, 0));
+               AssertEquals ("Compare two strings, with first length zero", -1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, s1.Length));
+               AssertEquals ("Compare strings, with second length zero", 1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, s1, 0, 0));
+               
+       }
+
+       // Culture-sensitive collation tests
+
+       CompareInfo invariant = CultureInfo.InvariantCulture.CompareInfo;
+       CompareInfo french = new CultureInfo ("fr").CompareInfo;
+       CompareInfo japanese = new CultureInfo ("ja").CompareInfo;
+       CompareInfo czech = new CultureInfo ("cs").CompareInfo;
+       CompareInfo hungarian = new CultureInfo ("hu").CompareInfo;
+
+       CompareOptions ignoreCN =
+               CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase;
+
+       void AssertCompare (string message, int result, string s1, string s2)
+       {
+               AssertCompare (message, result, s1, s2, CompareOptions.None);
+       }
+
+       void AssertCompare (string message, int result, string s1, string s2,
+               CompareOptions opt)
+       {
+               AssertCompare (message, result, s1, s2, opt, invariant);
+       }
+
+       void AssertCompare (string message, int result, string s1, string s2,
+               CompareOptions opt, CompareInfo ci)
+       {
+               int ret = ci.Compare (s1, s2, opt);
+               if (result == 0)
+                       AssertEquals (message, 0, ret);
+               else if (result < 0)
+                       Assert (message + String.Format ("(neg: {0})", ret), ret < 0);
+               else
+                       Assert (message + String.Format ("(pos: {0})", ret), ret > 0);
+       }
+
+       void AssertCompare (string message, int result,
+               string s1, int idx1, int len1, string s2, int idx2, int len2)
+       {
+               int ret = invariant.Compare (s1, idx1, len1, s2, idx2, len2);
+               if (result == 0)
+                       AssertEquals (message, 0, ret);
+               else if (result < 0)
+                       Assert (message, ret < 0);
+               else
+                       Assert (message, ret > 0);
+       }
+
+       void AssertCompare (string message, int result,
+               string s1, int idx1, int len1, string s2, int idx2, int len2,
+               CompareOptions opt, CompareInfo ci)
+       {
+               int ret = ci.Compare (s1, idx1, len1, s2, idx2, len2, opt);
+               if (result == 0)
+                       AssertEquals (message, 0, ret);
+               else if (result < 0)
+                       Assert (message, ret < 0);
+               else
+                       Assert (message, ret > 0);
+       }
+
+       void AssertIndexOf (string message, int expected,
+               string source, char target)
+       {
+               AssertEquals (message, expected,
+                       invariant.IndexOf (source, target));
+       }
+
+       void AssertIndexOf (string message, int expected, string source,
+               char target, CompareOptions opt)
+       {
+               AssertEquals (message, expected,
+                       invariant.IndexOf (source, target, opt));
+       }
+
+       void AssertIndexOf (string message, int expected, string source,
+               char target, int idx, int len, CompareOptions opt, CompareInfo ci)
+       {
+               AssertEquals (message, expected,
+                       ci.IndexOf (source, target, idx, len, opt));
+       }
+
+       void AssertIndexOf (string message, int expected,
+               string source, string target)
+       {
+               AssertEquals (message, expected,
+                       invariant.IndexOf (source, target));
+       }
+
+       void AssertIndexOf (string message, int expected, string source,
+               string target, CompareOptions opt)
+       {
+               AssertEquals (message, expected,
+                       invariant.IndexOf (source, target, opt));
+       }
+
+       void AssertIndexOf (string message, int expected, string source,
+               string target, int idx, int len, CompareOptions opt, CompareInfo ci)
+       {
+               AssertEquals (message, expected,
+                       ci.IndexOf (source, target, idx, len, opt));
+       }
+
+       void AssertLastIndexOf (string message, int expected,
+               string source, char target)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               char target, CompareOptions opt)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target, opt));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               char target, int idx, int len)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target, idx, len));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               char target, int idx, int len, CompareOptions opt, CompareInfo ci)
+       {
+               AssertEquals (message, expected,
+                       ci.LastIndexOf (source, target, idx, len, opt));
+       }
+
+       void AssertLastIndexOf (string message, int expected,
+               string source, string target)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               string target, CompareOptions opt)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target, opt));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               string target, int idx, int len)
+       {
+               AssertEquals (message, expected,
+                       invariant.LastIndexOf (source, target, idx, len));
+       }
+
+       void AssertLastIndexOf (string message, int expected, string source,
+               string target, int idx, int len, CompareOptions opt, CompareInfo ci)
+       {
+               AssertEquals (message, expected,
+                       ci.LastIndexOf (source, target, idx, len, opt));
+       }
+
+       void AssertIsPrefix (string message, bool expected, string source,
+               string target)
+       {
+               Assert (message, expected == invariant.IsPrefix (
+                       source, target));
+       }
+
+       void AssertIsPrefix (string message, bool expected, string source,
+               string target, CompareOptions opt)
+       {
+               Assert (message, expected == invariant.IsPrefix (
+                       source, target, opt));
+       }
+
+       void AssertIsSuffix (string message, bool expected, string source,
+               string target)
+       {
+               Assert (message, expected == invariant.IsSuffix (
+                       source, target));
+       }
+
+       void AssertIsSuffix (string message, bool expected, string source,
+               string target, CompareOptions opt)
+       {
+               Assert (message, expected == invariant.IsSuffix (
+                       source, target, opt));
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void CultureSensitiveCompare ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertCompare ("#1", -1, "1", "2");
+               AssertCompare ("#2", 1, "A", "a");
+               AssertCompare ("#3", 0, "A", "a", CompareOptions.IgnoreCase);
+               AssertCompare ("#6", 1, "12", "1");
+// BUG in .NET 2.0: See GetSortKey() test that assures sortkeys for "AE" and
+// "\u00C6" are equivalent.
+               AssertCompare ("#7", 0, "AE", "\u00C6");
+               AssertCompare ("#8", 0, "AB\u01c0C", "A\u01c0B\u01c0C", CompareOptions.IgnoreSymbols);
+// BUG in .NET 2.0: ditto.
+               AssertCompare ("#9", 0, "A\u0304", "\u0100");
+               AssertCompare ("#10", 1, "ABCABC", 5, 1, "1", 0, 1, CompareOptions.IgnoreCase, invariant);
+               AssertCompare ("#11", 0, "-d:NET_2_0", 0, 1, "-", 0, 1);
+
+// BUG in .NET 2.0: ditto.
+               AssertCompare ("#12", 0, "ae", "\u00E6");
+               AssertCompare ("#13", 0, "\u00E6", "ae");
+               AssertCompare ("#14", 0, "\u00E6s", 0, 1, "ae", 0, 2);
+
+               // target is "empty" (in culture-sensitive context).
+// BUG in .NET 2.0: \u3007 is totally-ignored character as a GetSortKey()
+// result, while it is not in Compare().
+               AssertCompare ("#17", 0, String.Empty, "\u3007");
+               AssertCompare ("#18", 1, "A", "\u3007");
+               AssertCompare ("#19", 1, "ABC", "\u3007");
+
+               // shift weight comparison 
+               AssertCompare ("#20", 1, "--start", "--");
+               // expansion
+// BUG in .NET 2.0: the same 00C6/00E6 issue.
+               AssertCompare ("#21", -1, "\u00E6", "aes");
+
+// bug #78748
+               AssertCompare ("#22", -1, "++)", "+-+)");
+               AssertCompare ("#23", -1, "+-+)", "+-+-)");
+               AssertCompare ("#24", 1, "+-+-)", "++)");
+               // BUG in .NET: it returns 1
+               AssertCompare ("#25", -1, "+-+-)", "-+-+)");
+               AssertCompare ("#26", -1, "+-+)", "-+-+)");
+               AssertCompare ("#27", -1, "++)", "-+-+)");
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void CompareSpecialWeight ()
+       {
+               if (!doTest)
+                       return;
+
+               // Japanese (in invariant)
+// BUG in .NET 2.0 : half-width kana should be bigger.
+               AssertCompare ("#1", 1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               AssertCompare ("#4", 1, "\u3042\u309D", "\u3042\u3042");
+               AssertCompare ("#5", 0, "\u3042\u309D", "\u3042\u3042", CompareOptions.IgnoreNonSpace);
+
+               // extender in target
+// BUG in .NET 2.0 : an extender should result in bigger sortkey
+               AssertCompare ("#7", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+               AssertCompare ("#8", 0, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
+               // extender in source
+// BUG in .NET 2.0 : vice versa
+               AssertCompare ("#9", 1, "\u30D1\u30FC", "\u30D1\u30A2");
+               AssertCompare ("#10", 0, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
+       }
+
+       [Test]
+       public void IndexOfChar ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIndexOf ("#1", -1, "ABC", '1');
+               AssertIndexOf ("#2", 2, "ABCABC", 'c', CompareOptions.IgnoreCase);
+               AssertIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
+               AssertIndexOf ("#5", 1, "ABCABC", 'B', 1, 5, CompareOptions.IgnoreCase, invariant);
+               AssertIndexOf ("#6", 4, "ABCABC", 'B', 2, 4, CompareOptions.IgnoreCase, invariant);
+       }
+
+       [Test]
+       [Category ("NotDotNet")]
+       public void IndexOfCharMSBug ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIndexOf ("#1", 0, "\u00E6", 'a');
+       }
+
+       [Test]
+       public void LastIndexOfChar ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertLastIndexOf ("#1", -1, "ABC", '1');
+               AssertLastIndexOf ("#2", 5, "ABCABC", 'c', CompareOptions.IgnoreCase);
+               AssertLastIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
+               AssertLastIndexOf ("#5", 1, "ABCABC", 'B', 3, 3);
+               AssertLastIndexOf ("#6", 4, "ABCABC", 'B', 4, 4);
+               AssertLastIndexOf ("#7", -1, "ABCABC", 'B', 5, 1);
+               AssertLastIndexOf ("#11", 0, "\\", '\\');
+               AssertEquals ("#11en", 0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\", '\\'));
+               AssertEquals ("#11ja", 0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\", '\\'));
+               AssertLastIndexOf ("#12", 8, "/system/web", 'w');
+               AssertEquals ("#12sv", 8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", 'w'));
+       }
+
+       [Test]
+       [Category ("NotDotNet")]
+       public void LastIndexOfCharMSBug ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIndexOf ("#1", 0, "\u00E6", 'a');
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void IsPrefix ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIsPrefix ("#1", false, "ABC", "c", CompareOptions.IgnoreCase);
+               AssertIsPrefix ("#2", false, "BC", "c", CompareOptions.IgnoreCase);
+               AssertIsPrefix ("#3", true, "C", "c", CompareOptions.IgnoreCase);
+               AssertIsPrefix ("#4", true, "EDCBA", "\u0117", ignoreCN);
+               AssertIsPrefix ("#5", true, "ABC", "AB", CompareOptions.IgnoreCase);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertIsPrefix ("#6", true, "ae", "\u00E6", CompareOptions.None);
+               AssertIsPrefix ("#7", true, "\u00E6", "ae", CompareOptions.None);
+
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertIsPrefix ("#8", true, "\u00E6", "a", CompareOptions.None);
+               AssertIsPrefix ("#9", true, "\u00E6s", "ae", CompareOptions.None);
+               AssertIsPrefix ("#10", false, "\u00E6", "aes", CompareOptions.None);
+               AssertIsPrefix ("#11", true, "--start", "--", CompareOptions.None);
+               AssertIsPrefix ("#12", true, "-d:NET_1_1", "-", CompareOptions.None);
+               AssertIsPrefix ("#13", false, "-d:NET_1_1", "@", CompareOptions.None);
+               // U+3007 is completely ignored character.
+               AssertIsPrefix ("#14", true, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+               AssertIsPrefix ("#15", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+               AssertIsPrefix ("#16", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+               AssertIsPrefix ("#17", true, "\\b\\a a", "\\b\\a a");
+               Assert ("#17en", new CultureInfo ("en").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"));
+               Assert ("#17ja", new CultureInfo ("ja").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"));
+       }
+
+       [Test]
+       public void IsPrefixSpecialWeight ()
+       {
+               if (!doTest)
+                       return;
+
+               // Japanese (in invariant)
+               AssertIsPrefix ("#1", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               AssertIsPrefix ("#2-2", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               AssertIsPrefix ("#3-2", false, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E", 
+                       "\u30C0\u30A4\u30D6");
+               AssertIsPrefix ("#4", false, "\u3042\u309D", "\u3042\u3042");
+
+               // extender in target
+               AssertIsPrefix ("#7", false, "\u30D1\u30A2", "\u30D1\u30FC");
+               // extender in source
+               AssertIsPrefix ("#9", false, "\u30D1\u30FC", "\u30D1\u30A2");
+
+               // empty suffix always matches the source.
+               AssertIsPrefix ("#11", true, "", "");
+               AssertIsPrefix ("#12", true, "/test.css", "");
+
+               // bug #76243
+               AssertIsPrefix ("#13", false, "\u00e4_", "a");
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void IsSuffix ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIsSuffix ("#1", true, "ABC", "c", CompareOptions.IgnoreCase);
+               AssertIsSuffix ("#2", true, "BC", "c", CompareOptions.IgnoreCase);
+               AssertIsSuffix ("#3", false, "CBA", "c", CompareOptions.IgnoreCase);
+               AssertIsSuffix ("#4", true, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+               AssertIsSuffix ("#5", false, "\u00E6", "a", CompareOptions.None);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertIsSuffix ("#6", true, "\u00E6", "ae", CompareOptions.None);
+               AssertIsSuffix ("#7", true, "ae", "\u00E6", CompareOptions.None);
+               AssertIsSuffix ("#8", false, "e", "\u00E6", CompareOptions.None);
+               // U+3007 is completely ignored character.
+               AssertIsSuffix ("#9", true, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+               AssertIsSuffix ("#10", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+               AssertIsSuffix ("#11", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+               // extender in target
+               AssertIsSuffix ("#12", false, "\u30D1\u30A2", "\u30D1\u30FC");
+               AssertIsSuffix ("#13", true, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
+               // extender in source
+               AssertIsSuffix ("#14", false, "\u30D1\u30FC", "\u30D1\u30A2");
+               AssertIsSuffix ("#15", true, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
+               // optimization sanity check
+               AssertIsSuffix ("#16", true,
+                       "/configuration/system.runtime.remoting",
+                       "system.runtime.remoting");
+
+               // empty suffix always matches the source.
+               AssertIsSuffix ("#17", true, "", "");
+               AssertIsSuffix ("#18", true, "/test.css", "");
+               AssertIsSuffix ("#19", true, "/test.css", "/test.css");
+               AssertIsSuffix ("#20", true, "\\b\\a a", "\\b\\a a");
+               Assert ("#20en", new CultureInfo ("en").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"));
+               Assert ("#20ja", new CultureInfo ("ja").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"));
+       }
+
+       [Test]
+       [Category ("NotDotNet")]
+       [Category ("NotWorking")]
+       public void IsSuffixMSBug ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIsSuffix ("#1", true, "\u00E6", "e", CompareOptions.None);
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void IndexOfString ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
+               AssertIndexOf ("#2", 2, "ABCABC", "c", CompareOptions.IgnoreCase);
+               AssertIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+               AssertIndexOf ("#5", 1, "ABCABC", "BC", CompareOptions.IgnoreCase);
+               AssertIndexOf ("#6", 1, "BBCBBC", "BC", CompareOptions.IgnoreCase);
+               AssertIndexOf ("#7", -1, "ABCDEF", "BCD", 0, 3, CompareOptions.IgnoreCase, invariant);
+               AssertIndexOf ("#8", 0, "-ABC", "-", CompareOptions.None);
+               AssertIndexOf ("#9", 0, "--ABC", "--", CompareOptions.None);
+               AssertIndexOf ("#10", -1, "--ABC", "--", 1, 2, CompareOptions.None, invariant);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertIndexOf ("#11", 0, "AE", "\u00C6", CompareOptions.None);
+               // U+3007 is completely ignored character.
+               AssertIndexOf ("#12", 0, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+               AssertIndexOf ("#13", 0, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+               AssertIndexOf ("#14", 0, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+               AssertIndexOf ("#15", 0, "\uff21\uff21", "\u3007", CompareOptions.None);
+               AssertIndexOf ("#15-2", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
+               // target is "empty" (in culture-sensitive context).
+               AssertIndexOf ("#16", -1, String.Empty, "\u3007");
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+               AssertIndexOf ("#17", 0, "A", "\u3007");
+               AssertIndexOf ("#18", 0, "ABC", "\u3007");
+
+               AssertIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
+               AssertEquals ("#19en", 0, new CultureInfo ("en").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"));
+               AssertEquals ("#19ja", 0, new CultureInfo ("ja").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"));
+       }
+
+       [Test]
+       public void IndexOfSpecialWeight ()
+       {
+               if (!doTest)
+                       return;
+
+               // Japanese (in invariant)
+               AssertIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               // extender in target
+               AssertIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+               // extender in source
+               AssertIndexOf ("#2-2", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               AssertIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
+       }
+
+       [Test]
+#if NET_2_0
+       [Category ("NotDotNet")]
+#endif
+       public void LastIndexOfString ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
+               AssertLastIndexOf ("#2", 5, "ABCABC", "c", CompareOptions.IgnoreCase);
+               AssertLastIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
+               AssertLastIndexOf ("#5", 4, "ABCABC", "BC", CompareOptions.IgnoreCase);
+               AssertLastIndexOf ("#6", 4, "BBCBBC", "BC", CompareOptions.IgnoreCase);
+               AssertLastIndexOf ("#7", 1, "original", "rig", CompareOptions.None);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertLastIndexOf ("#8", 0, "\u00E6", "ae", CompareOptions.None);
+               AssertLastIndexOf ("#9", 0, "-ABC", "-", CompareOptions.None);
+               AssertLastIndexOf ("#10", 0, "--ABC", "--", CompareOptions.None);
+               AssertLastIndexOf ("#11", -1, "--ABC", "--", 2, 2, CompareOptions.None, invariant);
+               AssertLastIndexOf ("#12", -1, "--ABC", "--", 4, 2, CompareOptions.None, invariant);
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertLastIndexOf ("#13", 0, "AE", "\u00C6", CompareOptions.None);
+               // U+3007 is completely ignored character.
+               AssertLastIndexOf ("#14", 1, "\uff21\uff21", "\uff21", CompareOptions.None);
+// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
+               AssertLastIndexOf ("#15", 1, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
+               AssertLastIndexOf ("#16", 1, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
+               AssertLastIndexOf ("#17", 1, "\uff21\uff21", "\u3007", CompareOptions.None);
+               AssertLastIndexOf ("#18", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
+               AssertLastIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
+               AssertEquals ("#19en", 0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"));
+               AssertEquals ("#19ja", 0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"));
+               // bug #80612
+               AssertLastIndexOf ("#20", 8, "/system/web", "w");
+               AssertEquals ("#20sv", 8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", "w"));
+       }
+
+       [Test]
+       public void LastIndexOfSpecialWeight ()
+       {
+               if (!doTest)
+                       return;
+
+               // Japanese (in invariant)
+               AssertLastIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
+               // extender in target
+               AssertLastIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
+               // extender in source
+               AssertLastIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
+       }
+
+       [Test]
+       public void LastIndexOfOrdinalString ()
+       {
+               if (!doTest)
+                       return;
+
+               AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#2", 5, "ABCABC", "C", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#3", -1, "ABCABC", "\uFF22", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#4", 4, "ABCABC", "BC", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#5", 4, "BBCBBC", "BC", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#6", 1, "original", "rig", CompareOptions.Ordinal);
+               AssertLastIndexOf ("#7", 0, "\\b\\a a", "\\b\\a a", CompareOptions.Ordinal);
+       }
+
+       [Test]
+       [Category ("TargetJvmNotWorking")]
+       // for bug #76702
+       public void NullCharacter ()
+       {
+               AssertEquals ("#1", -1, "MONO".IndexOf ("\0\0\0"));
+               AssertEquals ("#2", -1, "MONO".LastIndexOf ("\0\0\0"));
+               AssertEquals ("#3", 1, "MONO".CompareTo ("\0\0\0"));
+       }
+
+       [Test]
+       [Category ("NotDotNet")]
+       // MS.NET treats it as equivalent, while in IndexOf() it does not match.
+       public void NullCharacterWeird ()
+       {
+               AssertEquals ("#4", -1, "MONO".CompareTo ("MONO\0\0\0"));
+       }
+
+#if NET_2_0
+       [Test]
+       [Category ("NotDotNet")]
+       public void OrdinalIgnoreCaseCompare ()
+       {
+               if (!doTest)
+                       return;
+
+               // matches
+// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
+               AssertCompare ("#1", 0, "AE", "\u00C6", CompareOptions.None);
+// BUG in .NET 2.0 : It raises inappropriate ArgumentException.
+               // should not match since it is Ordinal
+               AssertCompare ("#2", -133, "AE", "\u00C6", CompareOptions.OrdinalIgnoreCase);
+
+               AssertCompare ("#3", 1, "AE", "\u00E6", CompareOptions.None);
+               // matches
+               AssertCompare ("#4", 0, "AE", "\u00E6", CompareOptions.IgnoreCase);
+               // should not match since it is Ordinal
+               AssertCompare ("#5", -133, "AE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+
+               AssertCompare ("#6", 0, "AE", "ae", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#7", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#8", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#9", 0, "ae", "ae", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#10", 0, "AE", "AE", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#11", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#12", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#13", 0, "ae", "AE", CompareOptions.OrdinalIgnoreCase);
+               AssertCompare ("#14", 0, "ola", "OLA", CompareOptions.OrdinalIgnoreCase);
+       }
+
+       [Test]
+       public void OrdinalIgnoreCaseIndexOf ()
+       {
+               AssertIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
+               AssertIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+               AssertIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
+       }
+
+       [Test]
+       public void OrdinalIgnoreCaseIndexOfChar ()
+       {
+               AssertIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
+               AssertIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
+               AssertIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
+       }
+
+       [Test]
+       public void OrdinalIgnoreCaseLastIndexOf ()
+       {
+               AssertLastIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#1-4", 1, "ABCDE", "bc", CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#1-5", -1, "BBBBB", "ab", CompareOptions.OrdinalIgnoreCase);
+       }
+
+       [Test]
+       public void OrdinalIgnoreCaseLastIndexOfChar ()
+       {
+               AssertLastIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
+               AssertLastIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
+       }
+
+       [Test] // bug #80865
+       public void IsPrefixOrdinalIgnoreCase ()
+       {
+               Assert ("aaaa".StartsWith ("A", StringComparison.OrdinalIgnoreCase));
+       }
+#endif
+}
+
+}
index 2738195a502abb0f7356472d4c487a8e9b19f8c9..bf8aa36c1d7196891a0532383ea52ff512d04a11 100644 (file)
@@ -39,6 +39,7 @@ namespace MonoTests.System.Globalization
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")] //OptionalCalendars not yet supported for TARGET_JVM.
                // make sure that all CultureInfo holds non-null calendars.
                public void OptionalCalendars ()
                {
index 664249597e26ea41bac6a70147aa1bc7f7b1f51a..76edd4cff51b25a4b3db939bc8853774ba302c1a 100644 (file)
@@ -78,7 +78,11 @@ namespace MonoTests.System.Globalization {
                public void DeserializeKnownValue ()
                {
                        MemoryStream ms = new MemoryStream (serialized_daylighttime);
+#if TARGET_JVM
+                       BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
                        BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
                        DaylightTime dt = (DaylightTime) bf.Deserialize (ms);
                        Assert.AreEqual (DateTime.MinValue, dt.Start, "Start");
                        Assert.AreEqual (DateTime.MaxValue, dt.End, "End");
index 211c07d520de94967b3d9004b942aff8dad056d1..5661fef921c013a803e89db9488664bc29e9e3eb 100644 (file)
@@ -1063,9 +1063,6 @@ namespace MonoTests.System.IO
        
        [Test]
        [ExpectedException(typeof(EndOfStreamException))]
-#if TARGET_JVM
-    [Category("NotWorking")]
-#endif
        public void ReadDecimalException ()
        {
                MemoryStream stream = new MemoryStream (new byte [] {0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0, 0, 0 ,87, 98, 0, 0, 0, 0, 0});
@@ -1234,9 +1231,6 @@ namespace MonoTests.System.IO
        }
        
        [Test]
-#if TARGET_JVM
-    [Category("NotWorking")]
-#endif
        public void ReadSingle ()
        {
                MemoryStream stream = new MemoryStream (new byte [] {65, 200, 0, 0, 0, 1, 2, 3, 4});
index fc63e4c750d5fb17b576a9d9c45a1df57585e8cd..118874e0ff3acea2278845b72dd7608648f7701e 100644 (file)
@@ -411,9 +411,6 @@ public class BinaryWriterTest : Assertion {
        }
        
        [Test]
-#if TARGET_JVM
-    [Category("NotWorking")]
-#endif
        public void WriteFloat ()
        {
                MemoryStream stream = new MemoryStream ();
index 1b615b63caaef92510f7cd36e4fd62fd81caf113..f2b4f36c0e3646cd1fd80d1ec6bf312f7ec4f030 100644 (file)
@@ -612,9 +612,6 @@ namespace MonoTests.System.IO
                }
  
                [Test]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
                public void DirectoryNameWithSpace ()
                {
                        // check for Unix platforms - see FAQ for more details
@@ -679,40 +676,32 @@ namespace MonoTests.System.IO
                                AssertEquals ("test#12", 0, time.Second);
                        }
 
-                       [Test]\r
-#if TARGET_JVM\r
-            [Category("NotWorking")]\r
-#endif
+                       [Test]
+            [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
                        public void LastAccessTime ()
                        {
                                DirectoryInfo info = new DirectoryInfo (TempFolder);
                                info.LastAccessTime = DateTime.Now;
                        }
 
-                       [Test]\r
-#if TARGET_JVM\r
-            [Category("NotWorking")]\r
-#endif
+                       [Test]
+            [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
                        public void LastAccessTimeUtc ()
                        {
                                DirectoryInfo info = new DirectoryInfo (TempFolder);
                                info.LastAccessTimeUtc = DateTime.Now;
                        }
 
-                       [Test]\r
-#if TARGET_JVM\r
-            [Category("NotWorking")]\r
-#endif
+                       [Test]
+            [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
                        public void CreationTime ()
                        {
                                DirectoryInfo info = new DirectoryInfo (TempFolder);
                                info.CreationTime = DateTime.Now;
                        }
 
-                       [Test]\r
-#if TARGET_JVM\r
-            [Category("NotWorking")]\r
-#endif
+                       [Test]
+            [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
                        public void CreationTimeUtc ()
                        {
                                DirectoryInfo info = new DirectoryInfo (TempFolder);
index 2db033fc1dbff34235453f7deb92a8369098b131..4311d691e69a32d863b4d6d8a3daa4437efd417a 100644 (file)
@@ -274,10 +274,8 @@ public class DirectoryTest
 #endif\r
        \r
        [Test]\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif \r
     public void GetCreationTimeException1 ()\r
        {\r
                Directory.GetCreationTime (null as string);\r
@@ -285,9 +283,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeException2 ()\r
        {\r
                Directory.GetCreationTime ("");\r
@@ -297,9 +293,7 @@ public class DirectoryTest
 #if !NET_2_0\r
        [ExpectedException(typeof(IOException))]\r
 #endif\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeException_NonExistingPath ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";\r
@@ -323,9 +317,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeException4 ()\r
        {\r
                Directory.GetCreationTime ("    ");\r
@@ -333,9 +325,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeException5 ()\r
        {\r
                Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
@@ -343,9 +333,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeUtcException1 ()\r
        {\r
                Directory.GetCreationTimeUtc (null as string);\r
@@ -353,9 +341,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeUtcException2 ()\r
        {\r
                Directory.GetCreationTimeUtc ("");\r
@@ -365,9 +351,7 @@ public class DirectoryTest
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
 #endif\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeUtc_NonExistingPath ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";\r
@@ -391,9 +375,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeUtcException4 ()\r
        {\r
                Directory.GetCreationTimeUtc ("    ");\r
@@ -401,9 +383,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM\r
        public void GetCreationTimeUtcException5 ()\r
        {\r
                Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());\r
@@ -411,9 +391,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTime_Null ()\r
        {\r
                Directory.GetLastAccessTime (null as string);\r
@@ -421,9 +399,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeException2 ()\r
        {\r
                Directory.GetLastAccessTime ("");\r
@@ -433,9 +409,7 @@ public class DirectoryTest
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
 #endif\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTime_NonExistingPath ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";\r
@@ -460,9 +434,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeException4 ()\r
        {\r
                Directory.GetLastAccessTime ("    ");\r
@@ -470,9 +442,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeException5 ()\r
        {\r
                Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());\r
@@ -480,9 +450,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeUtc_Null ()\r
        {\r
                Directory.GetLastAccessTimeUtc (null as string);\r
@@ -490,9 +458,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeUtcException2 ()\r
        {\r
                Directory.GetLastAccessTimeUtc ("");\r
@@ -502,9 +468,7 @@ public class DirectoryTest
 #if !NET_2_0\r
        [ExpectedException (typeof (IOException))]\r
 #endif\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeUtc_NonExistingPath ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";\r
@@ -527,9 +491,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeUtcException4 ()\r
        {\r
                Directory.GetLastAccessTimeUtc ("    ");\r
@@ -537,9 +499,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM\r
        public void GetLastAccessTimeUtcException5 ()\r
        {\r
                Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());\r
@@ -781,9 +741,7 @@ public class DirectoryTest
        }\r
        \r
        [Test]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM\r
        public void CreationTime ()\r
        {\r
                // check for Unix platforms - see FAQ for more details\r
@@ -837,9 +795,7 @@ public class DirectoryTest
        }\r
 \r
        [Test]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM\r
        public void LastAccessTime ()\r
        {\r
                string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";\r
@@ -1061,9 +1017,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1072,9 +1026,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeException2 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1083,9 +1035,7 @@ public class DirectoryTest
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeException3 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1100,9 +1050,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeException4 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1111,9 +1059,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeException5 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1139,9 +1085,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeUtcException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1150,9 +1094,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeUtcException2 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1161,9 +1103,7 @@ public class DirectoryTest
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeUtcException3 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1178,9 +1118,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeUtcException4 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1189,9 +1127,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM\r
        public void SetLastAccessTimeUtcException5 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1216,9 +1152,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1227,9 +1161,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeException2 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1238,9 +1170,7 @@ public class DirectoryTest
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeException3 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1256,9 +1186,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeException4 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1267,9 +1195,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeException5 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1296,9 +1222,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentNullException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeUtcException1 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1307,9 +1231,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeUtcException2 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1318,9 +1240,7 @@ public class DirectoryTest
        \r
        [Test]\r
        [ExpectedException(typeof(FileNotFoundException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeUtcException3 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1337,9 +1257,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeUtcException4 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
@@ -1348,9 +1266,7 @@ public class DirectoryTest
 \r
        [Test]\r
        [ExpectedException(typeof(ArgumentException))]\r
-#if TARGET_JVM\r
-    [Category("NotWorking")]\r
-#endif\r
+       [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM\r
        public void SetCreationTimeUtcException5 ()\r
        {\r
                DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);\r
index d2a2fd6e360912a2d1e4e75912acefedfcd49ae4..809647d6b66b7309bc92701bec1693aab694526a 100644 (file)
@@ -632,9 +632,7 @@ namespace MonoTests.System.IO
                
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
                public void OpenReadIOException ()
                {
                        string path = TempFolder + DSC + "FIT.OpenReadIOException.Test";
index f39861c86a6bafb9ae4382615e10361f2b41efc0..0d7b6d258f85d7fe2423b935008625e0eddcb398 100644 (file)
@@ -983,9 +983,7 @@ namespace MonoTests.System.IO
                        DeleteFile (path);
                }
 
-#if TARGET_JVM // File locking is not implemented.
-               [Category ("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
                public void TestLock ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "TestLock";
index 78ccf617302df45a25c0bbf1c8ea9c7a553f7957..43efdf5e669ad34e3188ac76c6a1aa193059cc99 100644 (file)
@@ -69,9 +69,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
-#if TARGET_JVM
-            [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
                public void CreationTimeFile ()
                {
                        string path = TempFolder + DSC + "FSIT.CreationTime.Test";
@@ -124,9 +122,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
-#if TARGET_JVM
-            [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
                public void CreationTimeDirectory ()
                {
                        string path = TempFolder + DSC + "FSIT.CreationTimeDirectory.Test";
@@ -168,9 +164,7 @@ namespace MonoTests.System.IO
                }
                
                [Test]
-#if TARGET_JVM
-            [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
                public void CreationTimeNoFileOrDirectory ()
                {
                        string path = TempFolder + DSC + "FSIT.CreationTimeNoFile.Test";
@@ -220,9 +214,7 @@ namespace MonoTests.System.IO
                }
                
                [Test]
-#if TARGET_JVM
-            [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
                public void DefaultLastAccessTime ()
                {
                        string path = TempFolder + DSC + "FSIT.DefaultLastAccessTime.Test";
@@ -246,9 +238,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
-#if TARGET_JVM
-            [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
                public void LastAccessTime ()
                {
                        string path = TempFolder + DSC + "FSIT.LastAccessTime.Test";
@@ -292,9 +282,7 @@ namespace MonoTests.System.IO
                }
                
                [Test]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
                public void DefaultLastWriteTime ()
                {
                        string path = TempFolder + DSC + "FSIT.DefaultLastWriteTime.Test";
index f66c6b41e8ee73ef718d8f63f0dfc5b806034475..97b51bfd3318ccad519a5e6e22fd5844acdf3293 100644 (file)
@@ -587,9 +587,7 @@ namespace MonoTests.System.IO
                 }
 
                [Test]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void TestGetCreationTime ()
                {
                         string path = TempFolder + Path.DirectorySeparatorChar + "baz";
@@ -606,9 +604,7 @@ namespace MonoTests.System.IO
 
                // Setting the creation time on Unix is not possible
                 [Test]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                 public void CreationTime ()
                 {
                        int platform = (int) Environment.OSVersion.Platform;
@@ -653,9 +649,7 @@ namespace MonoTests.System.IO
                 }
 
                 [Test]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                 public void LastAccessTime ()
                 {
                         string path = TempFolder + Path.DirectorySeparatorChar + "lastAccessTime";                     
@@ -751,9 +745,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentNullException))]      
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeException1 ()
                {
                        File.GetCreationTime (null as string);
@@ -761,9 +753,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]  
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeException2 ()
                {
                        File.GetCreationTime ("");
@@ -773,9 +763,7 @@ namespace MonoTests.System.IO
 #if !NET_2_0
                [ExpectedException(typeof(IOException))]
 #endif
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTime_NonExistingPath ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeException3";
@@ -795,9 +783,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeException4 ()
                {
                        File.GetCreationTime ("    ");
@@ -805,9 +791,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeException5 ()
                {
                        File.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@@ -815,9 +799,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeUtcException1 ()
                {
                        File.GetCreationTimeUtc (null as string);
@@ -825,9 +807,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeUtcException2 ()
                {
                        File.GetCreationTimeUtc ("");
@@ -837,9 +817,7 @@ namespace MonoTests.System.IO
 #if !NET_2_0
                [ExpectedException (typeof (IOException))]
 #endif
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeUtc_NonExistingPath ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeUtcException3";
@@ -858,9 +836,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeUtcException4 ()
                {
                        File.GetCreationTimeUtc ("    ");
@@ -868,9 +844,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
                public void GetCreationTimeUtcException5 ()
                {
                        File.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@@ -878,9 +852,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeException1 ()
                {
                        File.GetLastAccessTime (null as string);
@@ -888,9 +860,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeException2 ()
                {
                        File.GetLastAccessTime ("");
@@ -900,9 +870,7 @@ namespace MonoTests.System.IO
 #if !NET_2_0
                [ExpectedException (typeof (IOException))]
 #endif
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTime_NonExistingPath ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeException3";
@@ -922,9 +890,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeException4 ()
                {
                        File.GetLastAccessTime ("    ");
@@ -932,9 +898,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeException5 ()
                {
                        File.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());
@@ -942,9 +906,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeUtcException1 ()
                {
                        File.GetLastAccessTimeUtc (null as string);
@@ -952,9 +914,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeUtcException2 ()
                {
                        File.GetLastAccessTimeUtc ("");
@@ -964,9 +924,7 @@ namespace MonoTests.System.IO
 #if !NET_2_0
                [ExpectedException (typeof (IOException))]
 #endif
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeUtc_NonExistingPath ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3";
@@ -985,9 +943,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeUtcException4 ()
                {
                        File.GetLastAccessTimeUtc ("    ");
@@ -995,9 +951,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof(ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
                public void GetLastAccessTimeUtcException5 ()
                {
                        File.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());
@@ -1120,9 +1074,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeArgumentNullException1 ()
                {
                        File.SetCreationTime (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1130,9 +1082,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeArgumenException1 ()
                {
                        File.SetCreationTime ("", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1140,9 +1090,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeArgumenException2 ()
                {
                        File.SetCreationTime ("     ", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1150,9 +1098,7 @@ namespace MonoTests.System.IO
 
                [Test]
                // On Unix there are no invalid path chars.
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeArgumenException3 ()
                {
                        if (Path.InvalidPathChars.Length > 1) {
@@ -1169,9 +1115,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeFileNotFoundException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeFileNotFoundException1";
@@ -1200,9 +1144,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "CreationTimeIOException1";
@@ -1220,9 +1162,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcArgumentNullException1 ()
                { 
                        File.SetCreationTimeUtc (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1230,9 +1170,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcArgumenException1 ()
                {
                        File.SetCreationTimeUtc ("", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1240,9 +1178,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcArgumenException2 ()
                {
                        File.SetCreationTimeUtc ("     ", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1250,9 +1186,7 @@ namespace MonoTests.System.IO
 
                [Test]
                // On Unix there are no invalid path chars.
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcArgumentException3 ()
                {
                        if (Path.InvalidPathChars.Length > 1) {
@@ -1269,9 +1203,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcFileNotFoundException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcFileNotFoundException1";
@@ -1300,9 +1232,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
                public void SetCreationTimeUtcIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcIOException1";
@@ -1322,9 +1252,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeArgumentNullException1 ()
                {
                        File.SetLastAccessTime (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1332,9 +1260,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeArgumenException1 ()
                {
                        File.SetLastAccessTime ("", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1342,9 +1268,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeArgumenException2 ()
                {
                        File.SetLastAccessTime ("     ", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1352,9 +1276,7 @@ namespace MonoTests.System.IO
 
                [Test]
                // On Unix there are no invalid path chars.
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeArgumenException3 ()
                {
                        if (Path.InvalidPathChars.Length > 1) {
@@ -1371,9 +1293,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeFileNotFoundException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeFileNotFoundException1";
@@ -1402,9 +1322,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "LastAccessIOException1";
@@ -1422,9 +1340,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentNullException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeUtcArgumentNullException1 ()
                {
                        File.SetLastAccessTimeUtc (null as string, new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1432,9 +1348,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetCLastAccessTimeUtcArgumenException1 ()
                {
                        File.SetLastAccessTimeUtc ("", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1442,9 +1356,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (ArgumentException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeUtcArgumenException2 ()
                {
                        File.SetLastAccessTimeUtc ("     ", new DateTime (2000, 12, 12, 11, 59, 59));
@@ -1452,9 +1364,7 @@ namespace MonoTests.System.IO
 
                [Test]
                // On Unix there are no invalid path chars.
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeUtcArgumenException3 ()
                {
                        if (Path.InvalidPathChars.Length > 1) {
@@ -1471,9 +1381,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (FileNotFoundException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeUtcFileNotFoundException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcFileNotFoundException1";
@@ -1502,9 +1410,7 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
+               [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
                public void SetLastAccessTimeUtcIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcIOException1";
@@ -1589,9 +1495,6 @@ namespace MonoTests.System.IO
 
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
                public void SetLastWriteTimeIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "LastWriteTimeIOException1";
@@ -1674,9 +1577,6 @@ namespace MonoTests.System.IO
 //
                [Test]
                [ExpectedException(typeof (IOException))]
-#if TARGET_JVM
-        [Category("NotWorking")]
-#endif
                public void SetLastWriteTimeUtcIOException1 ()
                {
                        string path = TempFolder + Path.DirectorySeparatorChar + "SetLastWriteTimeUtcIOException1";
@@ -1684,7 +1584,7 @@ namespace MonoTests.System.IO
                        FileStream stream = null;
                        try {
                                stream = File.Create (path);
-                               File.SetLastAccessTimeUtc (path, new DateTime (1000, 12, 12, 11, 59, 59));
+                               File.SetLastWriteTimeUtc (path, new DateTime (1000, 12, 12, 11, 59, 59));
                        } finally {
                                if (stream != null)
                                        stream.Close ();
index da6cc6da192a412444a0600abeed8bc79a83155a..3d490f661f7f5819e79a53a53fbf0d79b5dfec46 100644 (file)
@@ -650,13 +650,11 @@ namespace MonoTests.System.IO
                [Test]
                public void WindowsSystem32_76191 ()
                {
-#if !TARGET_JVM
                        // check for Unix platforms - see FAQ for more details
                        // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
                        int platform = (int) Environment.OSVersion.Platform;
                        if ((platform == 4) || (platform == 128))
                                return;
-#endif
 
                        string curdir = Directory.GetCurrentDirectory ();
                        try {
@@ -677,13 +675,11 @@ namespace MonoTests.System.IO
                [Test]
                public void WindowsSystem32_77007 ()
                {
-#if !TARGET_JVM
                        // check for Unix platforms - see FAQ for more details
                        // http://www.mono-project.com/FAQ:_Technical#How_to_detect_the_execution_platform_.3F
                        int platform = (int) Environment.OSVersion.Platform;
                        if ((platform == 4) || (platform == 128))
                                return;
-#endif
 
                        string curdir = Directory.GetCurrentDirectory ();
                        try {
index 8468da6e4300bd716ce4dcfe7845376f263113d2..b46c86044597370f3d61c058b2ea8d29015fd789 100644 (file)
@@ -53,7 +53,9 @@ public class AssemblyNameTest {
 
        private string tempDir = Path.Combine (Path.GetTempPath (), "MonoTests.System.Reflection.AssemblyNameTest");
 
+#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
        private AppDomain domain;
+#endif // TARGET_JVM
 
        // created with "sn -o test.snk test.txt"
        static byte[] publicKey = { 0x07, 0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x52, 0x53, 0x41, 0x32, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x3D, 0xBD, 0x72, 0x08, 0xC6, 0x2B, 0x0E, 0xA8, 0xC1, 0xC0, 0x58, 0x07, 0x2B, 0x63, 0x5F, 0x7C, 0x9A, 0xBD, 0xCB, 0x22, 0xDB, 0x20, 0xB2, 0xA9, 0xDA, 0xDA, 0xEF, 0xE8, 0x00, 0x64, 0x2F, 0x5D, 0x8D, 0xEB, 0x78, 0x02, 0xF7, 0xA5, 0x36, 0x77, 0x28, 0xD7, 0x55, 0x8D, 0x14, 0x68, 0xDB, 0xEB, 0x24, 0x09, 0xD0, 0x2B, 0x13, 0x1B, 0x92, 0x6E, 0x2E, 0x59, 0x54, 0x4A, 0xAC, 0x18, 0xCF, 0xC9, 0x09, 0x02, 0x3F, 0x4F, 0xA8, 0x3E, 0x94, 0x00, 0x1F, 0xC2, 0xF1, 0x1A, 0x27, 0x47, 0x7D, 0x10, 0x84, 0xF5, 0x14, 0xB8, 0x61, 0x62, 0x1A, 0x0C, 0x66, 0xAB, 0xD2, 0x4C, 0x4B, 0x9F, 0xC9, 0x0F, 0x3C, 0xD8, 0x92, 0x0F, 0xF5, 0xFF, 0xCE, 0xD7, 0x6E, 0x5C, 0x6F, 0xB1, 0xF5, 0x7D, 0xD3, 0x56, 0xF9, 0x67, 0x27, 0xA4, 0xA5, 0x48, 0x5B, 0x07, 0x93, 0x44, 0x00, 0x4A, 0xF8, 0xFF, 0xA4, 0xCB, 0x73, 0xC0, 0x6A, 0x62, 0xB4, 0xB7, 0xC8, 0x92, 0x58, 0x87, 0xCD, 0x07,
@@ -75,7 +77,9 @@ public class AssemblyNameTest {
 
                Directory.CreateDirectory (tempDir);
 
+#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
                domain = Thread.GetDomain ();
+#endif // TARGET_JVM
        }
 
        [TearDown]
@@ -600,6 +604,7 @@ public class AssemblyNameTest {
        }
 
        [Test]
+       [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
        public void Ctor2 ()
        {
                const string assemblyName = "TestAssembly";
@@ -644,6 +649,7 @@ public class AssemblyNameTest {
        }
 
        [Test]
+       [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
        public void Ctor5 ()
        {
                const string assemblyName = "TestAssembly";
index f5e700ce5989c57646e634a5c552f424df8295ea..85972ebafcb80edf5ed0f070e21f8c2975c0bee7 100644 (file)
@@ -155,6 +155,7 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
+               [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
                [ExpectedException (typeof (ArgumentNullException))]
                public void GetFile_Null ()
                {
@@ -162,6 +163,7 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
+               [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
                [ExpectedException (typeof (ArgumentException))]
                public void GetFile_Empty ()
                {
@@ -169,6 +171,7 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
+               [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
                public void GetFiles_False ()
                {
                        Assembly corlib = typeof (int).Assembly;
@@ -181,6 +184,7 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
+               [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
                public void GetFiles_True ()
                {
                        Assembly corlib = typeof (int).Assembly;
index ba8cea1433fe2b5b18f0e8eb5ebdcffbbc33665f..3c953d6d2c719c21aece345756d1f6aa6a31aff3 100644 (file)
@@ -86,6 +86,7 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ReturnTypePseudoCustomAttributes () {
                        MethodInfo mi = typeof (MethodInfoTest).GetMethod ("ReturnTypeMarshalAs");
 
index 3835254c392d5a1f3102bae03000046ce1bc1b65..4267754c6bc372e6dcb19a8f9b61881f1dcfba9c 100644 (file)
@@ -63,7 +63,7 @@ public class ParameterInfoTest : Assertion
 
        public static void paramMethod (int i, [In] int j, [Out] int k, [Optional] int l, [In,Out] int m, [DefaultParameterValue (ParamEnum.Foo)] ParamEnum n) {
        }
-#if !TARGET_JVM
+#if !TARGET_JVM // No support for extern methods in TARGET_JVM
        [DllImport ("foo")]
        public extern static void marshalAsMethod (
                [MarshalAs(UnmanagedType.Bool)]int p0, 
@@ -87,6 +87,7 @@ public class ParameterInfoTest : Assertion
                AssertEquals (1, info[3].GetCustomAttributes (typeof (OptionalAttribute), true).Length);
                AssertEquals (2, info[4].GetCustomAttributes (true).Length);
 
+#if !TARGET_JVM // No support for extern methods in TARGET_JVM
                ParameterInfo[] pi = typeof (ParameterInfoTest).GetMethod ("marshalAsMethod").GetParameters ();
                MarshalAsAttribute attr;
 
@@ -101,6 +102,7 @@ public class ParameterInfoTest : Assertion
                AssertEquals (UnmanagedType.CustomMarshaler, attr.Value);
                AssertEquals ("5", attr.MarshalCookie);
                AssertEquals (typeof (Marshal1), Type.GetType (attr.MarshalType));
+#endif
        }
 #endif
 }              
index ba69ed0503ba2cef85676b6de18327fdc590a987..d0b31f1a8a85acff882023b59c82f55ebb3ba638 100644 (file)
@@ -107,7 +107,11 @@ namespace MonoTests.System.Runtime.Remoting.Contexts {
                public void DeserializeKnownValue ()
                {
                        MemoryStream ms = new MemoryStream (serialized_sync_attr);
+#if TARGET_JVM
+                       BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
+#else
                        BinaryFormatter bf = new BinaryFormatter ();
+#endif // TARGET_JVM
                        SynchronizationAttribute sa = (SynchronizationAttribute) bf.Deserialize (ms);
                        Assert.IsTrue (sa.IsReEntrant, "IsReEntrant");
                        Assert.IsFalse (sa.Locked, "Locked");
index eab01ffedee2242423af6b24ac122270ff6d84c1..36b9bec17d89cf399a7d0503e0075ab5df55c19c 100644 (file)
@@ -22,9 +22,6 @@ namespace MonoTests.System.Text
        public class EncodingInfoTest
        {
                [Test]
-#if TARGET_JVM
-               [Category("NotWorking")]
-#endif
                // The purpose of this test is to make sure that
                // new encodings added to I18N are also listed in the
                // returned array from Encoding.GetEncodings() so that
index e1de7e967968bfa930c66ec4c44d9872e34772cc..6b3289c33ba07d6aaf0d9eaf3bb1b19a130e43a3 100644 (file)
@@ -161,6 +161,7 @@ namespace MonoTests.System.Threading
                }\r
 \r
                [Test]\r
+               [Category("TargetJvmNotSupported")] // IntPtr native handles are not supported for TARGET_JVM.\r
                public void TestHandle()\r
                {\r
                        Mutex Sem = new Mutex();\r
index e9f794b72625ed0caa1bf747c5e1c134e7a32408..34d3b97d27e3410e52b5e0a9166224ae1558703e 100644 (file)
@@ -186,6 +186,7 @@ namespace MonoTests.System {
 #else
                [ExpectedException(typeof(MemberAccessException))]
 #endif
+               [Category ("TargetJvmNotWorking")]
                public void CreateInstanceAbstract2 () 
                {
                        Activator.CreateInstance (typeof (Type), true);
@@ -211,6 +212,7 @@ namespace MonoTests.System {
 #else
                [ExpectedException (typeof (MemberAccessException))]
 #endif
+               [Category ("TargetJvmNotWorking")]
                public void CreateInstanceAbstract5 () 
                {
                        Activator.CreateInstance (typeof (Type), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
@@ -218,6 +220,7 @@ namespace MonoTests.System {
 
 #if NET_2_0
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void CreateInstance_Nullable ()
                {
                        Assert.AreEqual (5, Activator.CreateInstance (typeof (Nullable<int>), new object [] { 5 }));
@@ -237,6 +240,7 @@ namespace MonoTests.System {
 
                [Test]
                [ExpectedException (typeof (ArgumentNullException))]
+               [Category ("TargetJvmNotWorking")]
                public void GetObject_UrlNull ()
                {
                        Activator.GetObject (typeof (COMTest), null);
@@ -291,6 +295,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
                public void Unification_FromFx10 ()
                {
                        Unification (String.Format (CorlibPermissionPattern, fx10version));
@@ -298,6 +303,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
                public void Unification_FromFx11 ()
                {
                        Unification (String.Format (CorlibPermissionPattern, fx11version));
@@ -305,6 +311,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
                public void Unification_FromFx20 ()
                {
                        Unification (String.Format (CorlibPermissionPattern, fx20version));
@@ -312,6 +319,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
                public void Unification_FromFx99_Corlib ()
                {
                        Unification (String.Format (CorlibPermissionPattern, "9.99.999.9999"));
@@ -322,6 +330,7 @@ namespace MonoTests.System {
 
 #if NET_2_0
                [Test]
+               [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
                [Category ("NotWorking")]
                public void Unification_FromFx99_System ()
                {
index 60a9a3bf2bb018db143781cf72a16a2e5053e3d6..b27b6d0381ab27d71cbd9a6ab9f7b07204828598 100644 (file)
@@ -33,6 +33,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ConfigurationFile_Relative_ApplicationBase ()
                {
                        string fileName = "blar.config";
@@ -54,6 +55,7 @@ namespace MonoTests.System
 
                [Test]
                [ExpectedException (typeof (MemberAccessException))] // The ApplicationBase must be set before retrieving this property
+               [Category ("TargetJvmNotWorking")]
                public void ConfigurationFile_Relative_NoApplicationBase ()
                {
                        AppDomainSetup setup = new AppDomainSetup();
@@ -74,6 +76,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase1 ()
                {
                        string expected_path = tmpPath.Replace(@"\", @"/");
@@ -101,6 +104,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase2 ()
                {
                        AppDomainSetup setup = new AppDomainSetup ();
@@ -109,6 +113,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase3 ()
                {
                        AppDomainSetup setup = new AppDomainSetup ();
@@ -118,6 +123,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase4 ()
                {
                        AppDomainSetup setup = new AppDomainSetup ();
@@ -145,6 +151,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase5 ()
                {
                        // This is failing because of (probably) a windows-ism, so don't worry
@@ -173,6 +180,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void ApplicationBase6 ()
                {
                        AppDomainSetup setup = new AppDomainSetup ();
index 9fce407fbdbbfa23fe07472240a68a976d2e4fea..04c59de5e41e50673f0b6c656c7730a2ee5f366e 100644 (file)
@@ -470,6 +470,11 @@ public class ArrayTest : Assertion
                        } catch (ArgumentException) {
                                errorThrown = true;
                        }
+#if TARGET_JVM // This is really implementation dependent behaviour.
+                       catch (RankException) {
+                               errorThrown = true;
+                       }
+#endif // TARGET_JVM
                        Assert("#E62", errorThrown);
                }
                {
@@ -630,6 +635,7 @@ public class ArrayTest : Assertion
                        Assert("#F03b", errorThrown);
                }
 #endif
+#if !TARGET_JVM // Arrays lower bounds are not supported for TARGET_JVM
                {
                        bool errorThrown = false;
                        try {
@@ -639,6 +645,7 @@ public class ArrayTest : Assertion
                        }
                        Assert("#F04", errorThrown);
                }
+#endif // TARGET_JVM
                {
                        bool errorThrown = false;
                        try {
@@ -649,6 +656,7 @@ public class ArrayTest : Assertion
                        }
                        Assert("#F05", errorThrown);
                }
+#if !TARGET_JVM // CreateInstance with lower bounds not supported for TARGET_JVM
                {
                        bool errorThrown = false;
                        try {
@@ -691,6 +699,7 @@ public class ArrayTest : Assertion
                Type szarrayType = new int [10].GetType ();
                Assert (szarrayType == (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0})).GetType ());
                Assert (szarrayType != (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {1})).GetType ());
+#endif // TARGET_JVM
        }
        
        [Test]
@@ -765,6 +774,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestGetEnumeratorNonZeroLowerBounds() {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -793,6 +803,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_Add () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -813,6 +824,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_Insert () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -833,6 +845,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_Remove () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -853,6 +866,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_RemoveAt () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -873,6 +887,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_Contains () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -898,6 +913,7 @@ public class ArrayTest : Assertion
        }
 
        [Test]
+       [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
        public void TestIList_IndexOf () {
                int[] myLengthsArray = new int[2] { 3, 5 };
                int[] myBoundsArray = new int[2] { 2, 3 };
@@ -2784,6 +2800,7 @@ public class ArrayTest : Assertion
 
        }
 
+#if !TARGET_JVM // BugBUG: T[] is not yet ICollection<T> under TARGET_JVM
        [Test]
        // From bug #80563
        public void ICollectionNull ()
@@ -2808,6 +2825,7 @@ public class ArrayTest : Assertion
                test = new List<object>(test);
                AssertEquals ("array with test", test.Contains (null), false);
        }
+#endif // TARGET_JVM
 #endif
 
        #region Bug 80299
index 0c3cadf6755ca25435ab9880061ff657d9bfe83d..66eb43aebbb69e450873d9d1fb70afd2dbe2af6e 100644 (file)
@@ -64,8 +64,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#4");
                        Assert.AreEqual ("message", bif.Message, "#5");
                        Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": message"), "#7");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": message",
                                bif.ToString (), "#7");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -81,8 +85,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#4");
                        Assert.AreEqual (string.Empty, bif.Message, "#5");
                        Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#7");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": ",
                                bif.ToString (), "#7");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -127,8 +135,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#5");
                        Assert.AreEqual ("message", bif.Message, "#6");
                        Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": message ---> "
                                + ame.GetType ().FullName + ": something", bif.ToString (), "#8");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -146,8 +158,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#5");
                        Assert.AreEqual (string.Empty, bif.Message, "#6");
                        Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ":  ---> "
                                + ame.GetType ().FullName + ": something", bif.ToString (), "#8");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -172,7 +188,9 @@ namespace MonoTests.System
                        Assert.IsNull (bif.FusionLog, "#7");
                        Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#8");
                        Assert.IsTrue (bif.ToString ().IndexOf ("---> " + ame.GetType ().FullName) != -1, "#9");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
                        Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#10");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -189,8 +207,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#4");
                        Assert.AreEqual ("message", bif.Message, "#5");
                        Assert.IsNull (bif.FusionLog, "#6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#7");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": message",
                                bif.ToString (), "#7");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -234,8 +256,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#5");
                        Assert.AreEqual ("message", bif.Message, "#6");
                        Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#8");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": message",
                                bif.ToString (), "#8");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -252,8 +278,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#A4");
                        Assert.AreEqual ("message", bif.Message, "#A5");
                        Assert.IsNull (bif.FusionLog, "#A6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#A7");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": message",
                                bif.ToString (), "#A7");
+#endif // TARGET_JVM
 
                        bif = new BadImageFormatException (string.Empty, (string) null);
 
@@ -265,8 +295,12 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#B4");
                        Assert.AreEqual (string.Empty, bif.Message, "#B5");
                        Assert.IsNull (bif.FusionLog, "#B6");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#B7");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": ",
                                bif.ToString (), "#B7");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -284,7 +318,11 @@ namespace MonoTests.System
                        Assert.IsNotNull (bif.Message, "#5");
                        Assert.AreEqual (string.Empty, bif.Message, "#6");
                        Assert.IsNull (bif.FusionLog, "#7");
+#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
+                       Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#8");
+#else
                        Assert.AreEqual (bif.GetType ().FullName + ": ", bif.ToString (), "#8");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -308,7 +346,9 @@ namespace MonoTests.System
                        Assert.IsNull (bif.FusionLog, "#5");
                        Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
                                + ": "), "#6");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
                        Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
+#endif // TARGET_JVM
                }
 
                [Test]
@@ -372,7 +412,9 @@ namespace MonoTests.System
                        Assert.IsNull (bif.FusionLog, "#B6");
                        Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
                                + ": "), "#B7");
+#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
                        Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
+#endif // TARGET_JVM
                        Assert.IsTrue (bif.ToString ().IndexOf ("''") != -1, "#B9");
                }
        }
index c3e7e0ca0bdb1ebb62ca827a3a660f6b7659ab6f..a294a1ff82cdca80af69afbd99088c1f492714e3 100644 (file)
@@ -2855,6 +2855,7 @@ namespace MonoTests.System {
 
                [Test]
                [ExpectedException (typeof (FormatException))]
+               [Category ("TargetJvmNotWorking")]
                public void FormatBase64CharArray_OnlyWhitespace ()
                {
                        Convert.FromBase64CharArray (new char[3] {' ', 
@@ -2984,6 +2985,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void FromBase64_Empty ()
                {
                        AssertEquals (new byte[0], Convert.FromBase64String (string.Empty));
index afd3b973d2e99a9fbe1ef2af6ffeef1048e0ea10..3bddac2e7dbcfae3592373c528cd653f8e6c92f4 100644 (file)
@@ -694,7 +694,7 @@ namespace MonoTests.System {
             Assert(1.2345678901234e-14 == (double)d);
 
             d = new Decimal(1.2342278901234e-25);
-            Assert((decimal)d == 1.234e-25m);
+            AssertEquals("A10", d, 1.234e-25m);
 
             // test exceptions
             try
index 4df2d39b7e5ae0c344427620207726436b668ef5..e963f05c2301bd2250efc4e10e6474c376767c6a 100644 (file)
@@ -138,8 +138,8 @@ namespace MonoTests.System
         public void TestRemainder()\r
         {\r
             Assert((decimal)Decimal.Remainder(3.6m, 1.3m) == 1.0m);\r
-            Assert((decimal)Decimal.Remainder(79228162514264337593543950335m \r
-                27703302467091960609331879.53200m) == 24420760848422211464106753m);\r
+            AssertEquals("A02", Decimal.Remainder(79228162514264337593543950335m\r
+                27703302467091960609331879.53200m), 24420760848422211464106753m);\r
 \r
             Assert((decimal)Decimal.Remainder(45937986975432m, 43987453m)\r
                 == 42334506m);\r
@@ -281,9 +281,9 @@ namespace MonoTests.System
                 Fail("" + errOp + " wrong multiplications, " + errOverflow + " wrong overflows");\r
             }\r
         }\r
-
-       // MS 1.x is being less precise than Mono (2 cases). MS 2.0 is correct.
-       // Mono doesn't produce the same result for (i==21/j==3)
+\r
+       // MS 1.x is being less precise than Mono (2 cases). MS 2.0 is correct.\r
+       // Mono doesn't produce the same result for (i==21/j==3)\r
         public void TestDiv()\r
         {\r
             decimal[] args = auto_build2;\r
index 0c23887b2234399bb082b21873f7fab021a01dbf..8a1bf1aff5c31305417f0d64cdc9f1359c01a892 100644 (file)
@@ -162,6 +162,7 @@ public class TimeZoneTest : TestCase {
         }
 
        [Test]
+       [Category ("TargetJvmNotWorking")]
        public void CurrentTimeZone_SerializationRoundtrip ()
        {
                TimeZone tz = TimeZone.CurrentTimeZone;
index 6387581c99ea8841425a52b701a817fb25f29529..70b07ff249cf5535f546c0e3aa598c00e8b684aa 100644 (file)
@@ -137,11 +137,16 @@ namespace MonoTests.System
                        Assert.AreEqual (typeof (ICloneable[][]).IsAssignableFrom (typeof (Duper[][])), true, "#12");
 
                        // Tests for vectors<->one dimensional arrays */
+#if TARGET_JVM // Lower bounds arrays are not supported for TARGET_JVM.
+                       Array arr1 = Array.CreateInstance (typeof (int), new int[] {1});
+                       Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
+#else
                        Array arr1 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0});
                        Array arr2 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {10});
 
                        Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
                        Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr2.GetType ()), false, "#14");
+#endif // TARGET_JVM
 
                        // Test that arrays of enums can be cast to their base types
                        Assert.AreEqual (typeof (int[]).IsAssignableFrom (typeof (TypeCode[])), true, "#15");
@@ -207,6 +212,7 @@ namespace MonoTests.System
                }
 
                [Test]
+               [Category ("TargetJvmNotWorking")]
                public void TestGetPropertyImpl() {
                        // Test getting property that is exact
                        Assert.AreEqual (typeof (NewVTable), typeof (NewVTable).GetProperty ("Item", new Type[1] { typeof (Int32) }).DeclaringType, "#01");
@@ -551,6 +557,7 @@ PublicKeyToken=b77a5c561934e089"));
                        Assert.IsNull (i);
                }
 
+#if !TARGET_JVM // Reflection.Emit is not supported for TARGET_JVM
                [Test]
                public void EqualsUnderlyingType ()
                {
@@ -569,6 +576,7 @@ PublicKeyToken=b77a5c561934e089"));
 
                        Assert.IsTrue (typeof (int).Equals (e));
                }
+#endif // TARGET_JVM
 
                [Test]
                public void GetElementType_Bug63841 ()