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:
authorMartin Baulig <martin@novell.com>2002-10-06 20:37:09 +0400
committerMartin Baulig <martin@novell.com>2002-10-06 20:37:09 +0400
commitc0e22c9f1dae49286ab919c09b27cbc1724ccfed (patch)
treebf08d459f7da0ec18912f6fa6fd785c4644bf2f5 /mcs/tests/test-154.cs
parentcb312fbab011fe88df9133c112885dd2adb3fde4 (diff)
2002-10-06 Martin Baulig <martin@gnome.org>
* test-164.cs: Added a few more testcases here. svn path=/trunk/mcs/; revision=8036
Diffstat (limited to 'mcs/tests/test-154.cs')
-rw-r--r--mcs/tests/test-154.cs54
1 files changed, 54 insertions, 0 deletions
diff --git a/mcs/tests/test-154.cs b/mcs/tests/test-154.cs
index d1c863d230e..f73b25dacaf 100644
--- a/mcs/tests/test-154.cs
+++ b/mcs/tests/test-154.cs
@@ -336,4 +336,58 @@ public class X
return res;
}
+
+ static int test23 (object obj, int a, out bool test) {
+ if (obj == null)
+ throw new ArgumentNullException ();
+
+ if (a == 5) {
+ test = false;
+ return 4;
+ } else {
+ test = true;
+ return 5;
+ }
+ }
+
+ static long test24 (int a) {
+ long b;
+
+ switch (a) {
+ case 0:
+ return 4;
+ }
+
+ if (a > 2) {
+ if (a == 5)
+ b = 4;
+ else if (a == 6)
+ b = 5;
+ else
+ return 7;
+
+ Console.WriteLine (b);
+ return b;
+ }
+
+ return 4;
+ }
+
+ static long test25 (int a) {
+ long b, c;
+
+ try {
+ b = 5;
+ } catch (NotSupportedException) {
+ throw new InvalidOperationException ();
+ }
+
+ try {
+ c = 5;
+ } catch {
+ throw new InvalidOperationException ();
+ }
+
+ return b + c;
+ }
}