2009-07-16 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-initialize-05.cs
blobe2d86af3003fea41c3f0c3f681294278c7f7914c
3 struct Point
5 public int X, Y;
8 class C
10 static Point p;
12 public static int Main ()
14 new Point {
15 X = 0,
16 Y = 0
19 var markerPosition = new Point {
20 X = 2 * 3,
21 Y = 9
24 if (markerPosition.X != 6)
25 return 1;
27 if (markerPosition.Y != 9)
28 return 2;
30 Point[] pa = new Point[] { new Point { X = 9 }, new Point { X = 8 } };
32 if (pa [0].X != 9)
33 return 3;
35 if (pa [1].X != 8)
36 return 3;
38 p = new Point { Y = -1 };
39 if (p.Y != -1)
40 return 4;
42 return 0;