2 public class TestIntOps
{
4 public static sbyte sbyte_add (sbyte a
, sbyte b
) {
8 public static short short_add (short a
, short b
) {
12 public static double double_add (double a
, double b
) {
16 public static int int_add (int a
, int b
) {
20 public static int int_sub (int a
, int b
) {
24 public static int int_mul (int a
, int b
) {
28 public static int Main() {
31 if (int_add (1, 1) != 2) return num
;
34 if (int_add (31, -1) != 30) return num
;
37 if (int_sub (31, -1) != 32) return num
;
40 if (int_mul (12, 12) != 144) return num
;
43 if (sbyte_add (1, 1) != 2) return num
;
46 if (sbyte_add (31, -1) != 30) return num
;
49 if (short_add (1, 1) != 2) return num
;
52 if (short_add (31, -1) != 30) return num
;
55 if (double_add (1.5, 1.5) != 3) return num
;
58 // add more meaningful tests