}\r
\r
[Test]\r
-#if TARGET_JVM\r
- [Category ("NotWorking")]\r
-#endif\r
public void TestCopyTo() {\r
{\r
bool errorThrown = false;\r
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
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