Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2001-12-04 03:54:29 +0300
committerMiguel de Icaza <miguel@gnome.org>2001-12-04 03:54:29 +0300
commit9b240f5e20ba55cecf41848bbabd59f8329443c3 (patch)
tree1d35f75aa69536533378b478584664c71db3af82 /mcs/tests/test-49.cs
parentc736b252ac8f644d27efeb8346fc103689ed5109 (diff)
Add new tests
svn path=/trunk/mcs/; revision=1516
Diffstat (limited to 'mcs/tests/test-49.cs')
-rwxr-xr-xmcs/tests/test-49.cs24
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;
}