Merge pull request #4935 from lambdageek/dev-handles-may
[mono.git] / mcs / tests / test-618.cs
index 7361796e006ad6130b351dbe425d4ef59641ce02..29891e49dacbc5854268e1b390a0c90e43c22a7e 100644 (file)
@@ -5,18 +5,39 @@ class C
        //
        // All the operations should be reduced
        //
-       public void ZeroBasedReductions ()
+       public static void ZeroBasedReductions ()
        {
                int a = 1;
                
                a = a + 0;
                a = a - 0;
+               a = a | 0;
+               a = 0 + a;
+               a = 0 | a;
                
                a = a >> 0x40;
        }
        
-       public static void Main ()
+       public static void ZeroBasedReductionsWithConversion ()
        {
+               byte b = 0;
+               b |= 0;
+               b += 0;
+               b -= 0;
+               b *= 1;
+       }
+       
+       public static int Main ()
+       {
+               ZeroBasedReductions ();
+               ZeroBasedReductionsWithConversion ();
+               
+               int a = 9;
+               a = 0 - a;
+               if (a != -9)
+                       return 1;
+               
+               return 0;
        }
 }