2008-09-29 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-305.cs
blobfde47d2beb9a30894a901c9cb8eecd1a41a6c601
1 // No array static/dynamic initilizers should be produced in this test
3 using System;
4 using System.Reflection;
6 class T
8 const byte c = 0;
9 const string s = null;
11 long [,,] a1 = new long [,,] {{{10,0}, {0,0}}, {{0,0}, {0,c}}};
12 byte [] a2 = new byte [] { 2 - 2, 0, c };
13 decimal [] a3 = new decimal [] { 2m - 2m, 0m, c };
14 string[,] a4 = new string[,] { {s, null}, { s, s }};
15 T[] a5 = new T[] { null, default (T) };
17 public static int Main ()
19 ConstructorInfo mi = typeof(T).GetConstructors ()[0];
20 MethodBody mb = mi.GetMethodBody();
22 if (mb.GetILAsByteArray ().Length > 90) {
23 Console.WriteLine("Optimization failed");
24 return 3;
27 return 0;