Author: marek
Date: 2007-09-25 11:14:04 -0400 (Tue, 25 Sep 2007)
New Revision: 86333
Modified:
trunk/mcs/tests/gtest-linq-12.cs
Log:
More tests.
Modified: trunk/mcs/tests/gtest-linq-12.cs
===================================================================
--- trunk/mcs/tests/gtest-linq-12.cs 2007-09-25 15:13:47 UTC (rev 86332)
+++ trunk/mcs/tests/gtest-linq-12.cs 2007-09-25 15:14:04 UTC (rev 86333)
@@ -1,25 +1,45 @@
-// Compiler options: -langversion:linq
-
-using System;
-using System.Linq;
-
-class NestedQuery
-{
- public static int Main ()
- {
- var e = from values in new [] { "aba", "bbb", "bab", "aaa" }
+// Compiler options: -langversion:linq
+
+using System;
+using System.Linq;
+
+class NestedQuery
+{
+ public static int Main ()
+ {
+ var e = from values in new [] { "aba", "bbb", "bab", "aaa" }
where values.Length > 0
+ select from type in values
+ where type == 'a'
+ select type;
+
+ int counter = 0;
+ foreach (var v in e)
+ foreach (var vv in v) {
+ ++counter;
+ Console.WriteLine (vv);
+ }
+
+
+ if (counter != 6)
+ return 1;
+
+ e = from values in new [] { "aba", "bbb", "bab", "aaa" }
+ let length = values.Length
select from type in values
- where type == 'a'
+ let x = 9
+ where length == 3
select type;
-
- int counter = 0;
- foreach (var v in e)
- foreach (var vv in v) {
- ++counter;
- Console.WriteLine (vv);
+ counter = 0;
+ foreach (var v in e)
+ foreach (var vv in v) {
+ ++counter;
+ Console.WriteLine (vv);
}
- return counter == 6 ? 0 : 1;
- }
-}
+ if (counter != 12)
+ return 2;
+
+ return 0;
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches