2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 24 Mar 2010 22:27:36 +0000 (22:27 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Wed, 24 Mar 2010 22:27:36 +0000 (22:27 -0000)
* DerivedTypesTests.cs: Fix some tests under v4.

svn path=/trunk/mcs/; revision=154177

mcs/class/corlib/Test/System.Reflection.Emit/ChangeLog
mcs/class/corlib/Test/System.Reflection.Emit/DerivedTypesTest.cs

index ec8a810ab7aa8253b4800cf789421ba57d94768b..87552ea370dc13d86817dbbb254804983b5f02c5 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * DerivedTypesTests.cs: Fix some tests under v4.
+
 2010-03-23 Rodrigo Kumpera  <rkumpera@novell.com>
 
        * MethodOnTypeBuilderInstTest.cs: Add Test for ContainsGenericParameters.
index 3425623f13de61f5a3c8a45404de0276d33c9938..17912b4fd4c1c22d877a476699e44a6090c3d2b6 100644 (file)
@@ -526,10 +526,14 @@ namespace MonoTests.System.Reflection.Emit
                        Assert.IsFalse (ptr.IsGenericType, "#9");
                        Assert.IsFalse (ptr.IsGenericTypeDefinition, "#10");
 
+#if NET_4_0
+                       Assert.AreEqual (TypeAttributes.Public, ptr.Attributes, "#11");
+#else
                        try {
-                               var x = ptr.Attributes; 
+                               var x = ptr.Attributes; //This is because GenericTypeParameterBuilder doesn't support Attributes 
                                Assert.Fail ("#11");
                        } catch (NotSupportedException) {}
+#endif
 
                        Assert.IsTrue (ptr.HasElementType, "#12");
                        Assert.IsTrue (ptr.IsPointer, "#13");
@@ -1030,10 +1034,15 @@ namespace MonoTests.System.Reflection.Emit
                        Assert.IsFalse (byref.IsGenericType, "#9");
                        Assert.IsFalse (byref.IsGenericTypeDefinition, "#10");
 
+
+#if NET_4_0
+                       Assert.AreEqual (TypeAttributes.Public, byref.Attributes, "#11");
+#else
                        try {
-                               var x = byref.Attributes; 
+                               var x = byref.Attributes; //This is because GenericTypeParameterBuilder doesn't support Attributes 
                                Assert.Fail ("#11");
                        } catch (NotSupportedException) {}
+#endif
 
                        Assert.IsTrue (byref.HasElementType, "#12");
                        Assert.IsTrue (byref.IsByRef, "#13");
@@ -1653,10 +1662,14 @@ namespace MonoTests.System.Reflection.Emit
                        Assert.IsFalse (arr.IsGenericType, "#9");
                        Assert.IsFalse (arr.IsGenericTypeDefinition, "#10");
 
+#if NET_4_0
+                       Assert.AreEqual (TypeAttributes.Public, arr.Attributes, "#11");
+#else
                        try {
                                var x = arr.Attributes; //This is because GenericTypeParameterBuilder doesn't support Attributes 
                                Assert.Fail ("#11");
                        } catch (NotSupportedException) {}
+#endif
 
                        Assert.IsTrue (arr.HasElementType, "#12");
                        Assert.IsTrue (arr.IsArray, "#13");