diff options
Diffstat (limited to 'mcs/tests/test-36.cs')
-rwxr-xr-x | mcs/tests/test-36.cs | 46 |
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; - } -} - |