[System] Use GZipStream from corefx
[mono-project.git] / mono / tests / jit-uint.cs
blob7dd325562ee283fbf8f0375a15a8e889f66f2231
1 public class TestJit {
3 public static uint test_call (uint a, uint b) {
4 return a+b;
7 public static int test_alu ()
9 uint a = 9, b = 6;
11 if ((a + b) != 15)
12 return 1;
14 if ((a - b) != 3)
15 return 1;
17 if ((a & 8) != 8)
18 return 1;
20 if ((a | 2) != 11)
21 return 1;
23 if ((a * b) != 54)
24 return 1;
26 if ((a / 4) != 2)
27 return 1;
29 if ((a % 4) != 1)
30 return 1;
32 b = 0;
33 if (~b != 0xffffffff)
34 return 1;
36 return 0;
39 public static int test_branch ()
41 uint a = 5, b = 5, t;
43 if (a == b) t = 1; else t = 0;
44 if (t != 1) return 1;
46 if (a != b) t = 0; else t = 1;
47 if (t != 1) return 1;
49 if (a >= b) t = 1; else t = 0;
50 if (t != 1) return 1;
52 if (a > b) t = 0; else t = 1;
53 if (t != 1) return 1;
55 if (a <= b) t = 1; else t = 0;
56 if (t != 1) return 1;
58 if (a < b) t = 0; else t = 1;
59 if (t != 1) return 1;
61 return 0;
64 public static int Main() {
65 int num = 1;
67 if (test_call (3, 5) != 8)
68 return num;
69 num++;
71 if (test_branch () != 0)
72 return num;
73 num++;
75 if (test_alu () != 0)
76 return num;
77 num++;
79 return 0;