diff options
Diffstat (limited to 'mcs/tests/test-22.cs')
-rw-r--r-- | mcs/tests/test-22.cs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/mcs/tests/test-22.cs b/mcs/tests/test-22.cs deleted file mode 100644 index 2e662494ddd..00000000000 --- a/mcs/tests/test-22.cs +++ /dev/null @@ -1,46 +0,0 @@ -// -// This test excercises invocations of methods in structures. -// -// Unlike classes, we can not just leave the result of a computed -// structure in the IL stack as a result. The reason is that the -// result is the whole structure, not a pointer to it. -// -// This program excercises invocations to methods on structures -// - -struct T { - public int a, b; -} - -struct S { - T t; - - public T GetT () - { - return t; - } - - public void Init () - { - t.a = 1; - t.b = 2; - } -} - -class M { - static int Main () - { - S s = new S (); - - s.Init (); - - if (s.GetT ().a != 1) - return 1; - - if (s.GetT ().b != 2) - return 2; - - return 0; - } -} - |