using System.Collections;
using System.IO;
using System.Reflection;
+using System.Reflection.Emit;
using System.Runtime.InteropServices;
class NoNamespaceClass {
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");
}
[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");
Assert.AreEqual (1, typeof (Derived1).GetProperties ().Length, "#03");
}
+#if !TARGET_JVM // StructLayout not supported for TARGET_JVM
[StructLayout(LayoutKind.Explicit, Pack = 4, Size = 64)]
public class Class1 {
}
Assert.AreEqual (CharSet.Unicode, attr3.CharSet);
}
#endif
+#endif // TARGET_JVM
[Test]
public void Namespace () {
Assert.IsNull (i);
}
+#if !TARGET_JVM // Reflection.Emit is not supported for TARGET_JVM
+ [Test]
+ public void EqualsUnderlyingType ()
+ {
+ AssemblyBuilderAccess access = AssemblyBuilderAccess.RunAndSave;
+ TypeAttributes attribs = TypeAttributes.Public;
+
+ AssemblyName name = new AssemblyName ();
+ name.Name = "enumtest";
+ AssemblyBuilder assembly =
+ AppDomain.CurrentDomain.DefineDynamicAssembly (
+ name, access);
+
+ ModuleBuilder module = assembly.DefineDynamicModule
+ ("m", "enumtest.dll");
+ EnumBuilder e = module.DefineEnum ("E", attribs, typeof (int));
+
+ Assert.IsTrue (typeof (int).Equals (e));
+ }
+#endif // TARGET_JVM
+
+ [Test]
+ public void GetElementType_Bug63841 ()
+ {
+ Assert.IsNull (typeof (TheEnum).GetElementType (), "#1");
+ }
+
#if NET_2_0
[Test]
public void FullNameGenerics ()