add failing test for bnc550722
[mcs.git] / tests / gtest-352.cs
blob3142b3cbe1b8d5855a55175b84cea5d264bd4853
1 // Compiler options: -o+
3 using System;
4 using System.Reflection;
6 struct D
8 public static D d1 = new D (1);
9 public int d2;
11 public D (int v)
13 d2 = 0;
17 class T
19 static int Main ()
21 ConstructorInfo mi = typeof(D).GetConstructors (BindingFlags.Instance | BindingFlags.Public)[0];
22 MethodBody mb = mi.GetMethodBody();
24 Console.WriteLine (mb.GetILAsByteArray ().Length);
25 if (mb.GetILAsByteArray ().Length != 8) {
26 return 1;
29 mi = typeof (D).GetConstructors (BindingFlags.Static | BindingFlags.NonPublic) [0];
30 mb = mi.GetMethodBody ();
32 Console.WriteLine (mb.GetILAsByteArray ().Length);
33 if (mb.GetILAsByteArray ().Length != 12) {
34 return 2;
37 Console.WriteLine ("OK");
38 return 0;