1 // Compiler options: -unsafe -r:gtest-166-lib.dll
7 public unsafe struct TestNew
{
8 private fixed char test_1
[128];
9 public fixed bool test2
[4];
11 public fixed int T
[2];
12 public fixed bool test20
[4], test21
[40];
14 private int foo
, foo2
;
15 public void SetTest () {
16 fixed (char* c
= test_1
) {
23 unsafe static int Test () {
24 TestNew tt
= new TestNew ();
31 ExternalStruct es
= new ExternalStruct ();
32 es
.double_buffer
[1] = 999999.8888;
33 es
.double_buffer
[0] = es
.double_buffer
[1];
36 if (Attribute
.GetCustomAttribute (typeof (TestNew
).GetField ("test2"), typeof (System
.Runtime
.CompilerServices
.FixedBufferAttribute
)) == null)
40 if (typeof (TestNew
).GetNestedTypes ().Length
!= 5)
43 foreach (Type t
in typeof (TestNew
).GetNestedTypes ()) {
44 if (Attribute
.GetCustomAttribute (t
, typeof (System
.Runtime
.CompilerServices
.CompilerGeneratedAttribute
)) == null)
48 Console
.WriteLine ("OK");
52 public static int Main () {