X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Ftests%2F2test-16.cs;fp=mcs%2Ftests%2F2test-16.cs;h=0000000000000000000000000000000000000000;hb=b0eff411fcc55fa6a7bbc5ee97bb592fe3204309;hp=32312cb4ede1a82a91fc54503280a9a80c7544b7;hpb=3757bc3f45e482dc17cb3b4e0a8dcd58c6777ee5;p=mono.git diff --git a/mcs/tests/2test-16.cs b/mcs/tests/2test-16.cs deleted file mode 100644 index 32312cb4ede..00000000000 --- a/mcs/tests/2test-16.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections; - -public class Tester -{ - string[] ABC = { "A", "B", "C" }; - // D - string [,] EFGH = { { "E", "F" }, { "G", "H"}}; - // I - ArrayList al = new ArrayList (); - - public Tester () - { - al.Add ("J"); - al.Add ("K"); - } - - public System.Collections.IEnumerator GetEnumerator() - { - foreach (string s in ABC){ - if (s == null) - throw new Exception (); - else - yield return s; - } - - yield return "D"; - foreach (string s in EFGH){ - if(s == null) - throw new Exception (); - else - yield return s; - } - - yield return "I"; - foreach (string s in al){ - if (s == null) - throw new Exception (); - else - yield return s; - } - - yield return "L"; - } -} - - -class Test -{ - public static int Main() - { - Tester tester = new Tester(); - string [] list = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L" }; - int top = 0; - - foreach (string s in tester){ - if (s != list [top]){ - Console.WriteLine ("Failure, got {0} expected {1}", s, list [top]); - return 1; - } - top++; - } - if (top != list.Length){ - Console.WriteLine ("Failure, expected {0} got {1}", list.Length, top); - } - Console.WriteLine ("Success"); - return 0; - } -}