merge 100015:100420
[mono.git] / mono / tests / interlocked-2.2.cs
index b25f84a03feed954432f2db9f67d7c7d0cb2e7d1..ae7d30a067f11716c6666c48f9ca3c889c282bb5 100644 (file)
@@ -72,6 +72,19 @@ public class InterlockTest
                if (o != o2)
                        return 15;
 
+               /* long increment/decrement */
+               la = 0x12345678;
+               lb = Interlocked.Increment (ref la);
+               if (la != 0x12345679)
+                       return 16;
+               if (lb != 0x12345679)
+                       return 16;
+               lb = Interlocked.Decrement (ref la);
+               if (la != 0x12345678)
+                       return 17;
+               if (lb != 0x12345678)
+                       return 18;              
+
                Console.WriteLine ("done!");
 
                return 0;