Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-linq-03.cs
1
2
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
6
7 class WhereTest
8 {
9         public static int Main ()
10         {
11                 int[] int_array = new int [] { 0, 1 };
12                 
13                 IEnumerable<int> e;
14                 
15                 e = from int i in int_array where i > 0 select i;
16                 
17                 if (e.ToList ()[0] != 1)
18                         return 1;
19
20                 e = from int i in int_array where i == 0 select i + 1;
21                 
22                 if (e.ToList ()[0] != 1)
23                         return 2;
24                 
25                 Console.WriteLine ("OK");
26                 return 0;
27         }
28 }