Author: marek
Date: 2007-09-17 12:41:06 -0400 (Mon, 17 Sep 2007)
New Revision: 85903

Added:
   trunk/mcs/tests/gtest-linq-11.cs
Log:
New test.



Added: trunk/mcs/tests/gtest-linq-11.cs
===================================================================
--- trunk/mcs/tests/gtest-linq-11.cs    2007-09-17 16:40:51 UTC (rev 85902)
+++ trunk/mcs/tests/gtest-linq-11.cs    2007-09-17 16:41:06 UTC (rev 85903)
@@ -0,0 +1,44 @@
+// Compiler options: -langversion:linq
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+class IntoTest
+{
+       public static int Main ()
+       {
+               int[] int_array = new int [] { 0, 1 };
+               
+               var e = from i in int_array 
+                       where i > 0
+                       select i
+                               into x
+                               select x + 99;
+               
+               var l = e.ToList ();
+               
+               if (l.Count != 1)
+                       return 1;
+
+               if (l [0] != 100)
+                       return 2;
+                       
+               e = from int i in int_array 
+                       select i + 3
+                               into x
+                               where x == 3
+                               select x + 5;
+               
+               l = e.ToList ();
+               
+               if (l.Count != 1)
+                       return 1;
+
+               if (l [0] != 8)
+                       return 2;                       
+                               
+               Console.WriteLine ("OK");
+               return 0;
+       }
+}

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to