Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / test-133.cs
1 using System;
2
3 public struct S {
4         public int a, b;
5 }
6
7 class T {
8         enum OpCode : ushort { False }
9         enum OpFlags : ushort { None }
10         static void DecodeOp (ushort word, out OpCode op, out OpFlags flags) {
11                 op = (OpCode)(word & 0x00ff);
12                 flags = (OpFlags)(word & 0xff00);
13         }
14         static void get_struct (out S s) {
15                 S ss;
16                 ss.a = 1;
17                 ss.b = 2;
18                 s = ss;
19         }
20         public static int Main() {
21                 OpCode op;
22                 OpFlags flags;
23                 S s;
24                 DecodeOp ((ushort)0x0203, out op, out flags);
25                 if (op != (OpCode)0x3)
26                         return 1;
27                 if (flags != (OpFlags)0x200)
28                         return 2;
29                 get_struct (out s);
30                 if (s.a != 1)
31                         return 3;
32                 if (s.b != 2)
33                         return 4;
34                 return 0;
35         }
36 }