X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2Ftest-366.cs;h=56ca7a85fafa57874e44867b82cdfbc9f147b5a5;hb=51b93b6c23229e18f9e99db621ea3d733cee9f9d;hp=357c4c5ac8ffb2a4088dbb605f401da815023c73;hpb=64f85a65b023522d3f34e9932e6a843e0ad8fc3b;p=mono.git diff --git a/mcs/tests/test-366.cs b/mcs/tests/test-366.cs index 357c4c5ac8f..56ca7a85faf 100644 --- a/mcs/tests/test-366.cs +++ b/mcs/tests/test-366.cs @@ -12,31 +12,12 @@ struct foo2 { class C { - static int Main () + public static int Main () { foo2 f = new foo2 (); // On .NET if we got this far, we run - // On Mono, we are going to actually use an internal routine to check if the offset is there - // - Type fit = typeof (FieldInfo); - MethodInfo gfo = fit.GetMethod ("GetFieldOffset", BindingFlags.Instance | BindingFlags.NonPublic); - if (gfo == null){ - Console.WriteLine ("PASS: On MS runtime, Test OK"); - return 0; - } - Type t = typeof (foo2); - FieldInfo fi = t.GetField ("$PRIVATE$", BindingFlags.Instance | BindingFlags.NonPublic); - - object res = gfo.Invoke (fi, null); - if (res.GetType () != typeof (Int32)) - return 1; - int r = (int) res; - if (r != 0){ - Console.WriteLine ("FAIL: Offset is not zero"); - return 1; - } Console.WriteLine ("PASS: Test passes on Mono"); return 0; }