2001-11-28 Ravi Pratap <ravi@ximian.com>
authorRavi Pratap M <ravi@mono-cvs.ximian.com>
Wed, 28 Nov 2001 17:12:19 +0000 (17:12 -0000)
committerRavi Pratap M <ravi@mono-cvs.ximian.com>
Wed, 28 Nov 2001 17:12:19 +0000 (17:12 -0000)
* test-48.cs : Add for constant emission tests.

* makefile : Update for the above as it passes nicely :-)

svn path=/trunk/mcs/; revision=1457

mcs/tests/ChangeLog
mcs/tests/makefile
mcs/tests/test-48.cs [new file with mode: 0644]

index a0da0de2ddf6243ee3b5846a2bb16c92b256ed96..eb793c24fa6f2febef4e8a7764c5d77772c7af91 100755 (executable)
@@ -1,3 +1,9 @@
+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
index ca217f7071abc0a5d1e5af1f897a016c450a9244..285f6736b2b61a2b594cfc407ca1f42c59f5f82b 100755 (executable)
@@ -9,7 +9,7 @@ TEST_SOURCES = \
        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
diff --git a/mcs/tests/test-48.cs b/mcs/tests/test-48.cs
new file mode 100644 (file)
index 0000000..5f92daf
--- /dev/null
@@ -0,0 +1,31 @@
+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;
+       }
+}