[System.Data] Try to fix random DataViewTest.DefaultColumnNameAddListChangedTest...
[mono-project.git] / mcs / tests / gtest-256.cs
blob4676674576a217c299024df6f70359e399e1e1ce
1 using System;
2 using System.Collections.Generic;
4 public class Test
6 public IEnumerator<string> GetEnumerator ()
8 yield return "TEST";
9 try {
10 int.Parse (arg);
11 } catch {
12 yield break;
14 yield return "TEST2";
17 public static void Main ()
19 new Test ().Run ();
22 string arg;
24 void Run ()
26 int i = 0;
27 foreach (string s in this)
28 i++;
29 if (i != 1)
30 throw new Exception ();
32 arg = "1";
33 i = 0;
34 foreach (string s in this)
35 i++;
36 if (i != 2)
37 throw new Exception ();