Author: marek
Date: 2008-02-20 12:29:30 -0500 (Wed, 20 Feb 2008)
New Revision: 96276
Added:
trunk/mcs/tests/test-614.cs
Modified:
trunk/mcs/tests/test-587.cs
Log:
More tests.
Modified: trunk/mcs/tests/test-587.cs
===================================================================
--- trunk/mcs/tests/test-587.cs 2008-02-20 17:28:30 UTC (rev 96275)
+++ trunk/mcs/tests/test-587.cs 2008-02-20 17:29:30 UTC (rev 96276)
@@ -1,5 +1,3 @@
-// Compiler options: -nowarn:0162
-
class Program
{
static int Main ()
@@ -8,10 +6,13 @@
if ((++ctc_f == 0 && false)) {
return 1;
+ } else if (false && +ctc_f == 0) {
+ return 2;
} else {
if (ctc_f != 1) {
- return 2;
+ return 3;
}
+
return 0;
}
}
Added: trunk/mcs/tests/test-614.cs
===================================================================
--- trunk/mcs/tests/test-614.cs 2008-02-20 17:28:30 UTC (rev 96275)
+++ trunk/mcs/tests/test-614.cs 2008-02-20 17:29:30 UTC (rev 96276)
@@ -0,0 +1,53 @@
+using System;
+
+class C {
+
+ public static int value;
+
+ static internal void And ()
+ {
+ if ((false & (value++ == 1)) != (false & (++value == 1)))
+ return;
+
+ if (((value++ == 1) & false) != ((++value == 1) & false))
+ return;
+
+ if ((false && (value++ == 1)) != (false && (++value == 1)))
+ return;
+
+ if (((value++ == 1) && false) != ((++value == 1) && false))
+ return;
+ }
+
+ static internal void Or ()
+ {
+ if ((false | (value++ == 1)) != (false | (++value == 1)))
+ return;
+
+ if (((value++ == 1) | false) != ((++value == 1) | false))
+ return;
+
+ if ((true || (value++ == 1)) != (true || (++value == 1)))
+ return;
+
+ if (((value++ == 1) || true) != ((++value == 1) || true))
+ return;
+ }
+
+ static int Main ()
+ {
+ value = 0;
+ And ();
+ Console.WriteLine (value);
+ if (value != 6)
+ return 1;
+
+ value = 0;
+ Or ();
+ Console.WriteLine (value);
+ if (value != 6)
+ return 2;
+
+ return 0;
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches