merged Sys.Web.Services 2.0 support in my branch:
[mono.git] / mono / mini / basic.cs
index b56800cfc7d9ec1a39d995df76b78de04fc78fd9..53fe900d5dacc5f6573d9aa89a88e96a4ffbbb2f 100644 (file)
@@ -152,6 +152,16 @@ class Tests {
                return b / 2;
        }
 
+       public static int test_2_div_fold4 () {
+               int b = -8;
+               return -(b / 4);
+       }
+
+       public static int test_2_div_fold16 () {
+               int b = 32;
+               return b / 16;
+       }
+
        public static int test_719177_div_destreg () {
                int year = 1970;
                return ((365* (year-1)) + ((year-1)/4));
@@ -1039,6 +1049,68 @@ class Tests {
 
                return 0;
        }
+
+       public static int test_0_mul_imm_opt ()
+       {
+               int i;
+
+               i = 1;
+               if ((i * 2) != 2)
+                       return 1;
+               i = -1;
+               if ((i * 2) != -2)
+                       return 2;
+               i = 1;
+               if ((i * 3) != 3)
+                       return 3;
+               i = -1;
+               if ((i * 3) != -3)
+                       return 4;
+               i = 1;
+               if ((i * 5) != 5)
+                       return 5;
+               i = -1;
+               if ((i * 5) != -5)
+                       return 6;
+               i = 1;
+               if ((i * 6) != 6)
+                       return 7;
+               i = -1;
+               if ((i * 6) != -6)
+                       return 8;
+               i = 1;
+               if ((i * 9) != 9)
+                       return 9;
+               i = -1;
+               if ((i * 9) != -9)
+                       return 10;
+               i = 1;
+               if ((i * 10) != 10)
+                       return 11;
+               i = -1;
+               if ((i * 10) != -10)
+                       return 12;
+               i = 1;
+               if ((i * 12) != 12)
+                       return 13;
+               i = -1;
+               if ((i * 12) != -12)
+                       return 14;
+               i = 1;
+               if ((i * 25) != 25)
+                       return 15;
+               i = -1;
+               if ((i * 25) != -25)
+                       return 16;
+               i = 1;
+               if ((i * 100) != 100)
+                       return 17;
+               i = -1;
+               if ((i * 100) != -100)
+                       return 18;
+               
+               return 0;
+       }
        
        public static int test_0_cne ()
        {
@@ -1055,22 +1127,7 @@ class Tests {
                
                return 0;
        }
-       
-       static byte b;
-       public static int test_0_byte_compares ()
-       {
-               b = 0xff;
-               if (b == -1)
-                       return 1;
-               b = 0;
-               if (!(b < System.Byte.MaxValue))
-                       return 2;
-               
-               if (!(b <= System.Byte.MaxValue))
-                       return 3;
-               
-               return 0;
-       }
+
        public static int test_0_cmp_regvar_zero ()
        {
                int n = 10;
@@ -1083,4 +1140,19 @@ class Tests {
                return 0;
        }
 
+       public static int test_5_div_un_cfold ()
+       {
+               uint i = 10;
+               uint j = 2;
+
+               return (int)(i / j);
+       }
+
+       public static int test_1_rem_un_cfold ()
+       {
+               uint i = 11;
+               uint j = 2;
+
+               return (int)(i % j);
+       }
 }