[interp] disable assemblyresolve_event6.exe
[mono.git] / mono / tests / test-byval-in-struct.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 [StructLayout (LayoutKind.Explicit)]
5 struct TestStructure {
6         [FieldOffset (0)]
7         internal int number;
8         [FieldOffset (8)]
9         [MarshalAs(UnmanagedType.ByValArray, SizeConst=1024)]
10         internal byte[] stuff;
11
12         static int Main () {
13                 int size = Marshal.SizeOf(typeof(TestStructure));
14                 Console.WriteLine("Size of t: {0}", size);
15                 if (size != 1032)
16                         return 1;
17
18                 size = Marshal.SizeOf(typeof(TestStructure2));
19                 Console.WriteLine("Size of t2: {0}", size);
20                 if (size != 8)
21                         return 2;
22
23                 return 0;
24         }
25 }
26
27 [StructLayout (LayoutKind.Explicit)]
28 struct TestStructure2 {
29         [FieldOffset (0)]
30         byte val;
31         [FieldOffset (2)]
32         int val2;
33 }