Author: martin
Date: 2005-03-16 05:16:35 -0500 (Wed, 16 Mar 2005)
New Revision: 41881
Added:
trunk/mcs/tests/gen-143.cs
Modified:
trunk/mcs/tests/Makefile
Log:
New test.
Modified: trunk/mcs/tests/Makefile
===================================================================
--- trunk/mcs/tests/Makefile 2005-03-16 10:15:48 UTC (rev 41880)
+++ trunk/mcs/tests/Makefile 2005-03-16 10:16:35 UTC (rev 41881)
@@ -122,7 +122,7 @@
gen-111 gen-112 gen-113 gen-114 gen-115 gen-116 gen-117 gen-118 gen-119
gen-120 \
gen-121 gen-122 gen-123 gen-124 gen-125 gen-127 gen-128 gen-129
gen-130 \
gen-131 gen-132 gen-133 gen-134 gen-135 gen-136 gen-137 gen-138 gen-139
gen-140 \
- gen-141 gen-142
+ gen-141 gen-142 gen-143
# gen-72 fails after the runtime changes in r40305
TEST_EXCLUDES_net_2_0 = $(NEW_TEST_SOURCES_common) gen-72
Added: trunk/mcs/tests/gen-143.cs
===================================================================
--- trunk/mcs/tests/gen-143.cs 2005-03-16 10:15:48 UTC (rev 41880)
+++ trunk/mcs/tests/gen-143.cs 2005-03-16 10:16:35 UTC (rev 41881)
@@ -0,0 +1,45 @@
+using System;
+
+class X
+{
+ static int Test ()
+ {
+ int? a = 5;
+ int? b = a++;
+
+ if (a != 6)
+ return 1;
+ if (b != 5)
+ return 2;
+
+ int? c = ++a;
+
+ if (c != 7)
+ return 3;
+
+ b++;
+ ++b;
+
+ if (b != 7)
+ return 4;
+
+ int? d = b++ + ++a;
+
+ if (a != 8)
+ return 5;
+ if (b != 8)
+ return 6;
+ if (d != 15)
+ return 7;
+
+ return 0;
+ }
+
+ static int Main ()
+ {
+ int result = Test ();
+ if (result != 0)
+ Console.WriteLine ("ERROR: {0}", result);
+ return result;
+ }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches