merge r98600
[mono.git] / mcs / tests / gtest-linq-12.cs
1 \r
2 \r
3 using System;\r
4 using System.Linq;\r
5 \r
6 class NestedQuery\r
7 {
8         public void XX ()
9         {
10                 var enumerable = new string[] { "aba", "bbb", "bab", "aaa" }.
11                         Select((values) => new { values = values, length = values.Length }).
12                                 Select((ti0) => ti0.values.Select ((type) => new { type = type, x = 9 }).Where((ti1) => (ti0.length == 3)).
13                         Select((ti1) => ti1.type));
14         }
15         \r
16         public static int Main ()\r
17         {/*\r
18                 var e = from values in new [] { "aba", "bbb", "bab", "aaa" }\r
19                         where values.Length > 0
20                         select from type in values\r
21                                 where type == 'a'\r
22                                 select type;\r
23                 \r
24                 int counter = 0;\r
25                 foreach (var v in e)\r
26                         foreach (var vv in v) {\r
27                                 ++counter;\r
28                                 Console.WriteLine (vv);\r
29                         }
30                         
31                 
32                 if (counter != 6)
33                         return 1;
34                         
35                 e = from values in new [] { "aba", "bbb", "bab", "aaa" }
36                         let length = values.Length
37                         select from type in values
38                                 let x = 9
39                                 where length == 3
40                                 select type;
41                 counter = 0;
42                 foreach (var v in e)\r
43                         foreach (var vv in v) {\r
44                                 ++counter;\r
45                                 Console.WriteLine (vv);\r
46                         }
47                         
48                 if (counter != 12)
49                         return 2;
50                         */
51                 return 0;\r
52         }\r
53 }\r