2003-05-28 Nick Drochak <ndrochak@gol.com>
authorNick Drochak <nickd@mono-cvs.ximian.com>
Tue, 27 May 2003 15:26:34 +0000 (15:26 -0000)
committerNick Drochak <nickd@mono-cvs.ximian.com>
Tue, 27 May 2003 15:26:34 +0000 (15:26 -0000)
* MethodBuilderTest: correct order of expected and actual values.

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

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

index f18dda74cb7e4270814507acfb7fda3eaf4f1262..96fe1141b06365a7124b7aacc106f20d0781ddb1 100644 (file)
@@ -1,3 +1,7 @@
+2003-05-28  Nick Drochak <ndrochak@gol.com>
+
+       * MethodBuilderTest: correct order of expected and actual values.
+
 2003-05-21  Zoltan Varga  <vargaz@freemail.hu>
 
        * ModuleBuilderTest.cs: New file.
index 0065ab697736ad750d2befb5d7a3fe49077291fc..9ea88f24033b203f2ebc61ec7636c7cc76be9cdd 100644 (file)
@@ -55,28 +55,28 @@ public class MethodBuilderTest : Assertion
                        genMethodName (), MethodAttributes.Public, typeof (void), new Type [0]);\r
 \r
                AssertEquals ("Attributes works", \r
-                                         mb.Attributes, MethodAttributes.Public);\r
+                                         MethodAttributes.Public, mb.Attributes);\r
        }\r
 \r
        public void TestCallingConvention () {\r
                MethodBuilder mb = genClass.DefineMethod (\r
                        genMethodName (), 0, typeof (void), new Type[0]);\r
                AssertEquals ("CallingConvetion defaults to Standard+HasThis",\r
-                                         mb.CallingConvention, \r
-                                         CallingConventions.Standard | CallingConventions.HasThis);\r
+                                         CallingConventions.Standard | CallingConventions.HasThis,\r
+                                         mb.CallingConvention);\r
 \r
                MethodBuilder mb3 = genClass.DefineMethod (\r
                        genMethodName (), 0, CallingConventions.VarArgs, typeof (void), new Type[0]);\r
                AssertEquals ("CallingConvetion works",\r
-                                         mb3.CallingConvention, \r
-                                         CallingConventions.VarArgs | CallingConventions.HasThis);\r
+                                         CallingConventions.VarArgs | CallingConventions.HasThis,\r
+                                         mb3.CallingConvention);\r
 \r
                MethodBuilder mb4 = genClass.DefineMethod (\r
                        genMethodName (), MethodAttributes.Static, CallingConventions.Standard,\r
                        typeof (void), new Type [0]);\r
                AssertEquals ("Static implies !HasThis",\r
-                                         mb4.CallingConvention,\r
-                                         CallingConventions.Standard);\r
+                                         CallingConventions.Standard,\r
+                                         mb4.CallingConvention);\r
        }\r
 \r
        public void TestDeclaringType () {\r
@@ -84,16 +84,16 @@ public class MethodBuilderTest : Assertion
                        genMethodName (), 0, typeof (void), new Type[0]);\r
 \r
                AssertEquals ("DeclaringType works",\r
-                                         mb.DeclaringType, genClass);\r
+                                         genClass, mb.DeclaringType);\r
        }\r
 \r
        public void TestInitLocals () {\r
                MethodBuilder mb = genClass.DefineMethod (\r
                        genMethodName (), 0, typeof (void), new Type[0]);\r
 \r
-               AssertEquals ("InitLocals defaults to true", mb.InitLocals, true);\r
+               Assert ("InitLocals defaults to true", mb.InitLocals);\r
                mb.InitLocals = false;\r
-               AssertEquals ("InitLocals is settable", mb.InitLocals, false);\r
+               Assert ("InitLocals is settable", !mb.InitLocals);\r
        }\r
 \r
        public void TestMethodHandle () {\r
@@ -112,7 +112,7 @@ public class MethodBuilderTest : Assertion
                MethodBuilder mb = genClass.DefineMethod (\r
                        name, 0, typeof (void), new Type [0]);\r
 \r
-               AssertEquals ("Name works", mb.Name, name);\r
+               AssertEquals ("Name works", name, mb.Name);\r
        }\r
 \r
        public void TestReflectedType () {\r
@@ -127,23 +127,23 @@ public class MethodBuilderTest : Assertion
                MethodBuilder mb = genClass.DefineMethod (\r
                        genMethodName (), 0, typeof (Console), new Type [0]);\r
 \r
-               AssertEquals ("ReturnType works", \r
-                                         mb.ReturnType, typeof (Console));\r
+               AssertEquals ("ReturnType works", typeof (Console),\r
+                                         mb.ReturnType);\r
 \r
                \r
                MethodBuilder mb2 = genClass.DefineMethod (\r
                        genMethodName (), 0, null, new Type [0]);\r
 \r
-               AssertEquals ("ReturnType is null",\r
-                                         mb2.ReturnType, null);\r
+               AssertEquals ("ReturnType is null", null,\r
+                                         mb2.ReturnType);\r
        }\r
 \r
        public void TestReturnTypeCustomAttributes () {\r
                MethodBuilder mb = genClass.DefineMethod (\r
                        genMethodName (), 0, typeof (Console), new Type [0]);\r
 \r
-               AssertEquals ("ReturnTypeCustomAttributes must be null",\r
-                                         mb.ReturnTypeCustomAttributes, null);\r
+               AssertEquals ("ReturnTypeCustomAttributes must be null", null,\r
+                                         mb.ReturnTypeCustomAttributes);\r
        }\r
 \r
        /*\r
@@ -281,14 +281,14 @@ public class MethodBuilderTest : Assertion
                        genMethodName (), 0, typeof (void), new Type [0]);\r
 \r
                AssertEquals ("MethodImplementationFlags defaults to Managed+IL",\r
-                                         mb.GetMethodImplementationFlags (),\r
-                                         MethodImplAttributes.Managed | MethodImplAttributes.IL);\r
+                                         MethodImplAttributes.Managed | MethodImplAttributes.IL,\r
+                                         mb.GetMethodImplementationFlags ());\r
 \r
                mb.SetImplementationFlags (MethodImplAttributes.OPTIL);\r
 \r
                AssertEquals ("SetImplementationFlags works",\r
-                                         mb.GetMethodImplementationFlags (),\r
-                                         MethodImplAttributes.OPTIL);\r
+                                         MethodImplAttributes.OPTIL, \r
+                                         mb.GetMethodImplementationFlags ());\r
 \r
                // Can not be called on a created type\r
                mb.CreateMethodBody (new byte[2], 0);\r
@@ -306,8 +306,8 @@ public class MethodBuilderTest : Assertion
                MethodBuilder mb = genClass.DefineMethod (\r
                        genMethodName (), 0, typeof (void), new Type [0]);\r
 \r
-               AssertEquals ("GetMethod works",\r
-                                         mb.GetModule (), module);\r
+               AssertEquals ("GetMethod works", module, \r
+                                         mb.GetModule ());\r
        }\r
 \r
        public void TestGetParameters () {\r
@@ -418,8 +418,8 @@ public class MethodBuilderTest : Assertion
                Type t = tb.CreateType ();\r
 \r
                AssertEquals ("Setting MethodImplAttributes works",\r
-                                         MethodImplAttributes.Synchronized,\r
-                                         t.GetMethod (name).GetMethodImplementationFlags ());\r
+                                         t.GetMethod (name).GetMethodImplementationFlags (),\r
+                                         MethodImplAttributes.Synchronized);\r
 \r
                // Null arguments again\r
                try {\r