using System;
using System.Threading;
using System.Reflection;
+#if !MONOTOUCH
using System.Reflection.Emit;
+#endif
using System.Runtime.Serialization;
using System.IO;
using System.Collections;
}
// Some of these tests overlap with the tests for ModuleBuilder
-
+#if !MONOTOUCH
[Test]
[Category("NotDotNet")] // path length can cause suprious failures
public void TestGlobalData () {
Assert.IsNull (m2.GetField ("DATA"), "#B3");
Assert.IsNull (m2.GetField ("DATA", BindingFlags.Public), "#B4");
}
+#endif
-#if NET_2_0
[Test]
public void ResolveType ()
{
try {
module.ResolveMethod (1234);
- Assert.Fail ();
+ Assert.Fail ("1234");
} catch (ArgumentException) {
}
try {
module.ResolveMethod (t.MetadataToken);
- Assert.Fail ();
+ Assert.Fail ("MetadataToken");
} catch (ArgumentException) {
}
try {
- module.ResolveMethod (t.GetMethod ("ResolveMethod").MetadataToken + 10000);
- Assert.Fail ();
+ module.ResolveMethod (t.GetMethod ("ResolveMethod").MetadataToken + 100000);
+ Assert.Fail ("GetMethod");
} catch (ArgumentOutOfRangeException) {
}
}
MethodBase res = mod.ResolveMethod (method.MetadataToken);
Assert.AreEqual (method, res, "#1");
}
-#endif
[Test]
public void FindTypes ()
Module m = typeof (ModuleTest).Module;
m.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
}
-
+#if !MONOTOUCH
[Test]
+ [Category ("AndroidNotWorking")] // Mono.CompilerServices.SymbolWriter not available for Xamarin.Android
public void GetTypes ()
{
AssemblyName newName = new AssemblyName ();
Assert.AreEqual (1, types.Count);
Assert.AreEqual ("Foo", ((Type)(types [0])).Name);
}
-
+#endif
class FindTypesTestFirstClass {
}