Add support for Windows x64 Full AOT + LLVM + Interpreter on CI. (#15276)
[mono-project.git] / mcs / tests / gtest-177.cs
blob05f921ddbcc47558a84887311f6c870e411270a1
1 using System;
2 using System.Collections.Generic;
4 class X
6 static int[] x = new int[] {100, 200};
8 public static int Main ()
10 IEnumerator<int> enumerator = X<int>.Y (x);
11 int sum = 0;
12 while (enumerator.MoveNext ())
13 sum += enumerator.Current;
15 if (sum != 300)
16 return 1;
18 if (X<int>.Z (x, 0) != 100)
19 return 2;
21 if (X<int>.Z (x, 1) != 200)
22 return 3;
24 return 0;
28 class X <T>
30 public static IEnumerator<T> Y (IEnumerable <T> x)
32 return x.GetEnumerator ();
35 public static T Z (IList<T> x, int index)
37 return x [index];