check_signed: check int types as well
[smatch.git] / validation / test-be.c
blob6b74555b1695f4e1f110d131ec78392a3d00732d
1 int printf(char *c, ...);
2 void exit(int c);
4 #undef PRINT_OUTPUTS
6 static void test_func_args(int x, int y)
8 if (x == y)
9 exit(1);
12 static int binop_s32(int x, int y)
14 int a;
16 a = a + x;
17 a = a / y;
18 a = a * x;
19 a = a - y;
21 return a;
24 static void test_binops(void)
26 int tmp_s32 = binop_s32(987123, 234);
28 #ifdef PRINT_OUTPUTS
29 printf("binop_s32(987123, 234) == %d\n", tmp_s32);
30 #else
31 if (tmp_s32 != -1470599007)
32 exit(2);
33 #endif
36 int main (int argc, char *argv[])
38 test_func_args(1, 2);
39 test_binops();
41 return 0;