comparison tests/t24.c @ 94:de18d1ac7d34

add some testing of arithmetic
author David A. Holland
date Mon, 10 Jun 2013 23:23:01 -0400
parents
children
comparison
equal deleted inserted replaced
93:da557b87be61 94:de18d1ac7d34
1 #if 0
2 wrong
3 #endif
4
5 #if 1
6 right
7 #endif
8
9 #if -1
10 right
11 #endif
12
13 #if 0 + 0
14 wrong
15 #endif
16
17 #if 1 + 1
18 right
19 #endif
20
21 #if 1 - 1
22 wrong
23 #endif
24
25 #if -1 + 1
26 wrong
27 #endif
28
29 #if 3 - 2 - 1
30 wrong
31 #endif
32
33 #if 3 * 2 - 6
34 wrong
35 #endif
36
37 #if 6 - 2 * 3
38 wrong
39 #endif
40
41 #if 3 - 3 && 1
42 wrong
43 #endif
44
45 #if 3 - 3 || 0
46 wrong
47 #endif
48
49 #if 1 && 0
50 wrong
51 #endif
52
53 #if 0 && 1
54 wrong
55 #endif
56
57 #if 1 || 0
58 right
59 #endif
60
61 #if 0 || 1
62 right
63 #endif
64
65 #if (0 || 1) && (0 || 0)
66 wrong
67 #endif