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>2002-07-04 01:46:25 +0400
committerMiguel de Icaza <miguel@gnome.org>2002-07-04 01:46:25 +0400
commit2ec4ad4ed7a14a8be3d5913eeb723dae83283658 (patch)
tree2dd260cf12f6cf74ca53fb6b0ff1b69da885b0dc /mcs/tests/test-140.cs
parent844f8cc5ad82e95315c7a1263bfc9f22dfb83968 (diff)
Add new test
svn path=/trunk/mcs/; revision=5582
Diffstat (limited to 'mcs/tests/test-140.cs')
-rwxr-xr-xmcs/tests/test-140.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/tests/test-140.cs b/mcs/tests/test-140.cs
new file mode 100755
index 00000000000..03c9757b16b
--- /dev/null
+++ b/mcs/tests/test-140.cs
@@ -0,0 +1,28 @@
+//
+// We used to generate incorrect code for breaks in infinite while loops
+//
+using System;
+
+public class BreakTest
+{
+ static int ok = 0;
+
+ public static void B ()
+ {
+ ok++;
+ while (true)
+ {
+ ok++;
+ break;
+ }
+ ok++;
+ }
+
+ public static int Main()
+ {
+ B ();
+ if (ok != 3)
+ return 1;
+ return 0;
+ }
+}