Move IL verifier test to the right folder.
[mono.git] / mono / tests / metadata-verifier / assembly-with-complex-type.cs
1 using System;
2 using System.Runtime.InteropServices;
3 public class TypeOne
4 {
5         int instance_field;
6         static int static_field;
7
8         public static void Main ()
9         {
10         }
11
12
13         public long SimpleMethod (int a, double b) {
14                 return a;
15         }
16 }
17
18 public interface Iface
19 {
20         void Foo ();
21 }
22
23
24 public class OtherType
25 {
26         int more_fields;
27         int bla;
28 }
29
30 public class TypeWithFunkyStuff
31 {
32         const string contant_field = "333";
33         [MarshalAs (UnmanagedType.Struct)] int bla;
34
35         int[] z = new int[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
36 }
37
38 public enum Foo
39 {
40         A,B,C
41 }
42
43 public class Bla : Iface
44 {
45         public void Foo () {
46                 int a,b,c;
47                 a = b = c = 0;
48         }
49 }
50
51 [StructLayout (LayoutKind.Sequential, Pack=8)]
52 public class SequentialLayout {
53         int a;
54         int b;
55 }
56
57 [StructLayout (LayoutKind.Sequential, Pack=4, Size=20)]
58 public class SequentialLayout2 {
59         int a;
60         int b;
61 }
62 [StructLayout (LayoutKind.Explicit)]
63 public class ExplicitLayout2 {
64         [FieldOffset (33)] int a;
65         [FieldOffset (0)] int b;
66 }
67
68 public class ZZ : Iface
69 {
70         void Iface.Foo () {
71         }
72 }
73
74 public class Generic<T> {
75
76 }
77
78 public class NonGeneric {
79
80         public static object Bla () 
81         {
82                 Generic<int> f = new Generic<int> ();
83                 return f;
84         }
85 }
86
87 public class OuterType {
88         public class InnerType {}
89 }