[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / gtest-linq-11.cs
blob6a87cf13faddd33fd7a42f46743895ed336a755e
3 using System;
4 using System.Collections.Generic;
5 using System.Linq;
7 class IntoTest
9 public static int Main ()
11 int[] int_array = new int [] { 0, 1 };
13 var e = from i in int_array
14 where i > 0
15 select i
16 into x
17 select x + 99;
19 var l = e.ToList ();
21 if (l.Count != 1)
22 return 1;
24 if (l [0] != 100)
25 return 2;
27 e = from int i in int_array
28 select i + 3
29 into x
30 where x == 3
31 select x + 5;
33 l = e.ToList ();
35 if (l.Count != 1)
36 return 1;
38 if (l [0] != 8)
39 return 2;
41 Console.WriteLine ("OK");
42 return 0;