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
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
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
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
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
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
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