2010-05-13 Rodrigo Kumpera <rkumpera@novell.com>
[mono-project.git] / mcs / tests / test-133.cs
blob1e27fc406314772cd2c2e462cd97de828daf7255
1 using System;
3 public struct S {
4 public int a, b;
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);
14 static void get_struct (out S s) {
15 S ss;
16 ss.a = 1;
17 ss.b = 2;
18 s = ss;
20 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;