Mark tests as not working under TARGET_JVM
[mono.git] / mcs / class / corlib / Test / System / ActivatorTest.cs
index 3a0742406572b3810187f4bccd8c7e7e2f9ba01c..34d3b97d27e3410e52b5e0a9166224ae1558703e 100644 (file)
@@ -13,7 +13,9 @@ using System;
 using System.Globalization;
 using System.IO;
 using System.Reflection;
+#if !TARGET_JVM // Reflection.Emit not supported for TARGET_JVM
 using System.Reflection.Emit;
+#endif
 using System.Runtime.InteropServices;
 using System.Runtime.Remoting;
 using System.Runtime.Remoting.Channels;
@@ -117,6 +119,7 @@ namespace MonoTests.System {
                        Assert.AreEqual (7, objCOMTest.Id, "#A05");
                }
 
+#if !TARGET_JVM // Reflection.Emit not supported for TARGET_JVM
                [Test]
                [ExpectedException (typeof (MissingMethodException))]
                public void CreateInstance_TypeBuilder ()
@@ -139,6 +142,7 @@ namespace MonoTests.System {
                {
                        Activator.CreateInstance (typeof (ArgIterator), null);
                }
+#endif // TARGET_JVM
 
                [Test]
                [ExpectedException (typeof (NotSupportedException))]
@@ -147,12 +151,14 @@ namespace MonoTests.System {
                        Activator.CreateInstance (typeof (void), null);
                }
 
+#if !TARGET_JVM // RuntimeArgumentHandle not supported for TARGET_JVM
                [Test]
                [ExpectedException (typeof (NotSupportedException))]
                public void CreateInstance_RuntimeArgumentHandle ()
                {
                        Activator.CreateInstance (typeof (RuntimeArgumentHandle), null);
                }
+#endif // TARGET_JVM
 
                [Test]
                [ExpectedException (typeof (NotSupportedException))]
@@ -180,6 +186,7 @@ namespace MonoTests.System {
 #else
                [ExpectedException(typeof(MemberAccessException))]
 #endif
+               [Category ("TargetJvmNotWorking")]
                public void CreateInstanceAbstract2 () 
                {
                        Activator.CreateInstance (typeof (Type), true);
@@ -205,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);
@@ -212,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 }));
@@ -231,6 +240,7 @@ namespace MonoTests.System {
 
                [Test]
                [ExpectedException (typeof (ArgumentNullException))]
+               [Category ("TargetJvmNotWorking")]
                public void GetObject_UrlNull ()
                {
                        Activator.GetObject (typeof (COMTest), null);
@@ -285,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));
@@ -292,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));
@@ -299,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));
@@ -306,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"));
@@ -316,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 ()
                {