diff options
author | Miguel de Icaza <miguel@gnome.org> | 2001-12-04 03:54:29 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2001-12-04 03:54:29 +0300 |
commit | 9b240f5e20ba55cecf41848bbabd59f8329443c3 (patch) | |
tree | 1d35f75aa69536533378b478584664c71db3af82 /mcs/tests/test-49.cs | |
parent | c736b252ac8f644d27efeb8346fc103689ed5109 (diff) |
Add new tests
svn path=/trunk/mcs/; revision=1516
Diffstat (limited to 'mcs/tests/test-49.cs')
-rwxr-xr-x | mcs/tests/test-49.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mcs/tests/test-49.cs b/mcs/tests/test-49.cs index ee004fac065..1a479853145 100755 --- a/mcs/tests/test-49.cs +++ b/mcs/tests/test-49.cs @@ -368,6 +368,21 @@ class X { } return 4; } + + static int test_def (string s) + { + switch (s){ + case "one": + goto default; + case "two": + return 1; + case "three": + return 2; + default: + return 3; + } + return 4; + } static int Main () { @@ -437,6 +452,15 @@ class X { if (testp ("blah") != 4) return 25; + if (test_def ("one") != 3) + return 26; + if (test_def ("two") != 1) + return 27; + if (test_def ("three") != 2) + return 28; + if (test_def (null) != 3) + return 29; + Console.WriteLine ("All tests pass"); return 0; } |