Another dist build fix for rx integration, move *.cs file to safe-ish path.
[mono-project.git] / mcs / tests / gtest-fixedbuffer-08.cs
blobcad4f3bcdbdce0548f5c6823f1a83393c3b60f72
1 // Compiler options: -unsafe
3 using System;
4 using System.Runtime.InteropServices;
6 [StructLayout (LayoutKind.Auto, CharSet = CharSet.Auto)]
7 struct S
9 public unsafe fixed byte o[6];
12 class A
14 public static int Main ()
16 Type t = typeof (S);
17 var sa = t.StructLayoutAttribute;
18 if (sa.Value != LayoutKind.Auto)
19 return 1;
21 if (sa.CharSet != CharSet.Auto)
22 return 2;
24 if (sa.Pack != 8)
25 return 3;
27 if (sa.Size != 0)
28 return 4;
30 t = t.GetNestedTypes ()[0];
31 sa = t.StructLayoutAttribute;
32 if (sa.Value != LayoutKind.Sequential)
33 return 11;
35 if (sa.CharSet != CharSet.Auto)
36 return 12;
38 if (sa.Pack != 8)
39 return 13;
41 if (sa.Size != 6)
42 return 14;
44 return 0;