Mark tests as not working under TARGET_JVM
[mono.git] / mcs / class / corlib / Test / System.Collections / HashtableTest.cs
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