* test-48.cs : Add for constant emission tests.
* makefile : Update for the above as it passes nicely :-)
svn path=/trunk/mcs/; revision=1457
+2001-11-28 Ravi Pratap <ravi@ximian.com>
+
+ * test-48.cs : Add for constant emission tests.
+
+ * makefile : Update for the above as it passes nicely :-)
+
2001-11-22 Ravi Pratap <ravi@ximian.com>
* test-45.cs : Augment some more to test shorthand declaration
test-11 test-12 test-13 test-14 test-15 test-16 test-17 test-18 test-19 test-20 \
test-21 test-23 test-24 test-25 test-26 test-27 test-28 \
test-31 test-32 test-33 test-34 test-35 test-37 test-39 test-40 test-42 test-43 \
- test-44 test-45 test-46 test-47
+ test-44 test-45 test-46 test-47 test-48
TEST_NOPASS = \
test-22 test-29
--- /dev/null
+using System;
+
+public class Blah {
+
+ public const int i = 5;
+
+ public static int Main ()
+ {
+ const int foo = 10;
+
+ Blah blah = new Blah ();
+ int j = Blah.i;
+
+ if (j != 5)
+ return 1;
+
+ if (foo != 10)
+ return 1;
+
+ for (int i = 0; i < 5; ++i){
+ const int bar = 15;
+
+ Console.WriteLine (bar);
+ Console.WriteLine (foo);
+ }
+
+ Console.WriteLine ("Constant emission test okay");
+
+ return 0;
+ }
+}