diff options
author | Martin Baulig <martin@novell.com> | 2005-05-04 14:21:29 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2005-05-04 14:21:29 +0400 |
commit | 30c0fcb33fa12e3b74dfa63d5562a83d28da8590 (patch) | |
tree | 594e7c09504763283cedcb7eb22200642986777c /mcs/tests/test-49.cs | |
parent | d1bfa346ab5ee9541a4e11e675915d97c0a07b2e (diff) |
2005-05-04 Martin Baulig <martin@ximian.com>
* test-49.cs: Add testcase from 74655.
svn path=/trunk/mcs/; revision=44014
Diffstat (limited to 'mcs/tests/test-49.cs')
-rw-r--r-- | mcs/tests/test-49.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mcs/tests/test-49.cs b/mcs/tests/test-49.cs index b8074f3a24e..04a76d1a98b 100644 --- a/mcs/tests/test-49.cs +++ b/mcs/tests/test-49.cs @@ -497,6 +497,22 @@ class X { 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 () { @@ -615,6 +631,15 @@ class X { 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; |