2005-05-04 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Wed, 4 May 2005 10:21:29 +0000 (10:21 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 4 May 2005 10:21:29 +0000 (10:21 -0000)
* test-49.cs: Add testcase from 74655.

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

mcs/tests/ChangeLog
mcs/tests/test-49.cs

index 0c5c00af792db4a8ae480cd3bfcbdf1a87fbf695..64df8311c0720b0c35b6e928596505e3fd40f6e9 100644 (file)
@@ -1,3 +1,7 @@
+2005-05-04  Martin Baulig  <martin@ximian.com>
+
+       * test-49.cs: Add testcase from 74655.
+
 2005-05-03  Raja R Harinath  <rharinath@novell.com>
 
        * test-372.cs: New test from #74773.
 2005-05-03  Raja R Harinath  <rharinath@novell.com>
 
        * test-372.cs: New test from #74773.
index b8074f3a24e2ed9ea2d3fd4c718034945622530f..04a76d1a98b8ad3324d8b1217d73b4685630eabf 100644 (file)
@@ -497,6 +497,22 @@ class X {
                        return 2;
                }
        }
                        return 2;
                }
        }
+
+       // Bug #74655
+       static int tests_default_2 (string foo)
+       {
+               switch (foo) {
+               case "Hello":
+                       break;
+               default:
+                       return 1;
+               case "foo":
+                       return 2;
+               case "Monkey":
+                       break;
+               }
+               return 3;
+       }
        
        static int Main ()
        {
        
        static int Main ()
        {
@@ -615,6 +631,15 @@ class X {
                        return 45;
                if (tests_default ("how") != 2)
                        return 46;
                        return 45;
                if (tests_default ("how") != 2)
                        return 46;
+
+               if (tests_default_2 ("Test") != 1)
+                       return 47;
+               if (tests_default_2 ("foo") != 2)
+                       return 48;
+               if (tests_default_2 ("Hello") != 3)
+                       return 49;
+               if (tests_default_2 ("Monkey") != 3)
+                       return 50;
                
                Console.WriteLine ("All tests pass");
                return 0;
                
                Console.WriteLine ("All tests pass");
                return 0;