2010-05-27 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-143.cs
blob6a9f561c2e55327d6643f2592e4cc4ec3434aa50
1 using System;
3 class X
5 static int Test ()
7 int? a = 5;
8 int? b = a++;
10 if (a != 6)
11 return 1;
12 if (b != 5)
13 return 2;
15 int? c = ++a;
17 if (c != 7)
18 return 3;
20 b++;
21 ++b;
23 if (b != 7)
24 return 4;
26 int? d = b++ + ++a;
28 if (a != 8)
29 return 5;
30 if (b != 8)
31 return 6;
32 if (d != 15)
33 return 7;
35 return 0;
38 static int Main ()
40 int result = Test ();
41 if (result != 0)
42 Console.WriteLine ("ERROR: {0}", result);
43 return result;