New tests.
authorMarek Safar <marek.safar@gmail.com>
Thu, 11 Nov 2010 18:34:42 +0000 (18:34 +0000)
committerMarek Safar <marek.safar@gmail.com>
Fri, 12 Nov 2010 08:25:37 +0000 (08:25 +0000)
mcs/tests/dtest-048.cs [new file with mode: 0644]
mcs/tests/gtest-548.cs [new file with mode: 0644]
mcs/tests/gtest-anon-20.cs [new file with mode: 0644]

diff --git a/mcs/tests/dtest-048.cs b/mcs/tests/dtest-048.cs
new file mode 100644 (file)
index 0000000..aa205bf
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+class A
+{
+       static int M (string s, object o)
+       {
+               return 1;
+       }
+
+       static int M (string s, params object[] o)
+       {
+               if (o != null)
+                       return 2;
+
+               return 0;
+       }
+
+       public static int Main ()
+       {
+               if (M ("x", null) != 0)
+                       return 1;
+               
+               if (M ("x", (object[])null) != 0)
+                       return 2;
+               
+               if (M ("x", (dynamic)null) != 0)
+                       return 3;
+               
+               return 0;
+       }
+}
\ No newline at end of file
diff --git a/mcs/tests/gtest-548.cs b/mcs/tests/gtest-548.cs
new file mode 100644 (file)
index 0000000..732ed6a
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+
+class C
+{
+       public static int Main ()
+       {
+               if (null > null)
+                       return 1;
+               
+               if ((int?)null > null)
+                       return 2;
+
+               if (null >= null)
+                       return 3;
+               
+               if ((int?)null >= null)
+                       return 4;
+
+               if (null < null)
+                       return 10;
+               
+               if ((int?)null < null)
+                       return 11;
+
+               if (null <= null)
+                       return 12;
+               
+               if ((int?)null <= null)
+                       return 13;
+               
+               if ((null * null) != null)
+                       return 20;
+
+               if ((null / null) != null)
+                       return 21;
+
+               if ((null % null) != null)
+                       return 22;
+
+               if ((null - null) != null)
+                       return 22;
+
+               if ((null >> null) != null)
+                       return 23;
+
+               if ((null << null) != null)
+                       return 24;
+               
+               Console.WriteLine ("ok");
+               return 0;
+       }
+}
diff --git a/mcs/tests/gtest-anon-20.cs b/mcs/tests/gtest-anon-20.cs
new file mode 100644 (file)
index 0000000..ac2a101
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+
+class C<T>
+{
+       public static void Foo<U> (U arg)
+       {
+               Action a = () => C<U>.Run ();
+               a ();
+       }
+       
+       static void Run ()
+       {
+       }
+}
+
+class A
+{
+       public static void Main ()
+       {
+               C<int>.Foo<long> (8);
+       }
+}
\ No newline at end of file