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:
Diffstat (limited to 'mcs/tests/test-36.cs')
-rwxr-xr-xmcs/tests/test-36.cs46
1 files changed, 0 insertions, 46 deletions
diff --git a/mcs/tests/test-36.cs b/mcs/tests/test-36.cs
deleted file mode 100755
index 9f4897a82f4..00000000000
--- a/mcs/tests/test-36.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// This program excercises invoking foreach on structures
-// that implement GetEnumerator
-//
-
-using System;
-using System.Collections;
-struct X {
- int [] a;
-
- public IEnumerator GetEnumerator ()
- {
- a = new int [3] { 1, 2, 3};
- return a.GetEnumerator ();
- }
- }
-
-class Y {
- static X x;
-
- static int Main ()
- {
- int total = 0;
- x = new X ();
-
- foreach (object a in x){
- total += (int) a;
- }
-
- if (total != 6)
- return 1;
-
- total = 0;
-
- //
- // implicit block
- //
- foreach (object a in x)
- total += (int) a;
- if (total != 6)
- return 2;
-
- return 0;
- }
-}
-