Sfoglia il codice sorgente

TARGET_JVM adjustments.

svn path=/trunk/mcs/; revision=74259
Eyal Alalouf 19 anni fa
parent
commit
4e5940e2e7

+ 4 - 0
mcs/class/corlib/Test/System.Reflection/ChangeLog

@@ -1,3 +1,7 @@
+2007-03-14  Eyal Alaluf <[email protected]>
+
+	* MethodInfoTest.cs: Disabled tests for TARGET_JVM that use MethodBody.
+
 2006-11-14  Raja R Harinath  <[email protected]>
 
 	* AssemblyTest.cs (bug79872): New test for #79872.

+ 6 - 2
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs

@@ -177,6 +177,7 @@ namespace MonoTests.System.Reflection
 		}
 
 #if NET_2_0
+#if !TARGET_JVM // MethodBody is not supported for TARGET_JVM
 		[Test]
 		public void GetMethodBody_Abstract () {
 			MethodBody mb = typeof (ICloneable).GetMethod ("Clone").GetMethodBody ();
@@ -203,7 +204,7 @@ namespace MonoTests.System.Reflection
 					Assert.IsNull (mb);
 				}
 		}
-#if !TARGET_JVM
+
 		public static void locals_method () {
 			byte[] b = new byte [10];
 
@@ -213,7 +214,7 @@ namespace MonoTests.System.Reflection
 				}
 			}
 		}
-#endif
+
 		[Test]
 		public void GetMethodBody () {
 			MethodBody mb = typeof (MethodInfoTest).GetMethod ("locals_method").GetMethodBody ();
@@ -232,6 +233,7 @@ namespace MonoTests.System.Reflection
 			else
 				Assert.AreEqual (false, locals [1].IsPinned, "#6");
 		}
+#endif // TARGET_JVM
 
 		public int return_parameter_test () {
 			return 0;
@@ -247,6 +249,7 @@ namespace MonoTests.System.Reflection
 			//Assert.AreEqual (True, pi.IsRetval);
 		}
 
+#if !TARGET_JVM // ReflectionOnly is not supported yet on TARGET_JVM
 		[Test]
 		[ExpectedException (typeof (InvalidOperationException))]
 		public void InvokeOnRefOnlyAssembly ()
@@ -257,6 +260,7 @@ namespace MonoTests.System.Reflection
 			
 			m.Invoke (null, new object [0]);
 		}
+#endif // TARGET_JVM
 
 		[Test]
 		public void InvokeGenericVtype ()