diff options
author | Miguel de Icaza <miguel@gnome.org> | 2002-05-11 05:17:52 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2002-05-11 05:17:52 +0400 |
commit | aa0d586b18ad7dc64564803acea44b64209f0fce (patch) | |
tree | 50e5bfa6310cbcfe4ab506c06a4f2ebe70340af5 /mcs/tests/test-49.cs | |
parent | d4acecfc06a1ab0b55bf0a363959f265888591eb (diff) |
2002-05-11 Miguel de Icaza <miguel@ximian.com>
* test-49.cs: Improve test.
svn path=/trunk/mcs/; revision=4516
Diffstat (limited to 'mcs/tests/test-49.cs')
-rwxr-xr-x | mcs/tests/test-49.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mcs/tests/test-49.cs b/mcs/tests/test-49.cs index 67f2c38807c..24d8b6b4799 100755 --- a/mcs/tests/test-49.cs +++ b/mcs/tests/test-49.cs @@ -393,6 +393,20 @@ class X { return 10; } } + + static int test_goto (int a) + { + switch (a){ + case 0: + goto case 2; + case 1: + return 10; + case 2: + return 20; + default: + return 100; + } + } static int Main () { @@ -473,6 +487,15 @@ class X { if (test_coverage (100) != 10) return 30; + + if (test_goto (0) != 20) + return 31; + if (test_goto (1) != 10) + return 32; + if (test_goto (2) != 20) + return 33; + if (test_goto (200) != 100) + return 34; Console.WriteLine ("All tests pass"); return 0; |