Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 1 | Format: 'expected actual' |
2 | 163 163 | ||||
3 | 4 4 | ||||
4 | 16 16 | ||||
5 | 8 8 | ||||
6 | 2 2 | ||||
7 | 4 4 | ||||
8 | 2 2 | ||||
9 | 2 2 | ||||
10 | 1 1 | ||||
11 | 0 0 | ||||
12 | 0 0 | ||||
13 | 0 0 | ||||
14 | 1 1 | ||||
15 | 1 1 | ||||
16 | 2 2 | ||||
17 | -3 -3 | ||||
18 | -2 -2 | ||||
19 | 1 1 | ||||
20 | 0 0 | ||||
21 | 2 2 | ||||
22 | 131072 131072 | ||||
23 | 29 29 | ||||
24 | 33 33 | ||||
25 | 49 49 | ||||
26 | 1 1 | ||||
27 | 1 1 | ||||
28 | 0 0 | ||||
29 | 0 0 | ||||
30 | 1 1 | ||||
31 | 1 1 | ||||
32 | 1 1 | ||||
33 | 2 2 | ||||
34 | 3 3 | ||||
35 | 1 1 | ||||
36 | 58 58 | ||||
37 | 2 2 | ||||
38 | 60 60 | ||||
39 | 1 1 | ||||
40 | 256 256 | ||||
41 | 16 16 | ||||
42 | 62 62 | ||||
43 | 4 4 | ||||
44 | 29 29 | ||||
45 | 5 5 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 46 | unary plus, minus |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 47 | -4 -4 |
48 | 4 4 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 49 | conditional expressions |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 50 | 1 1 |
51 | 32 32 | ||||
52 | 32 32 | ||||
53 | 1 1 | ||||
54 | 1 1 | ||||
55 | 32 32 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 56 | check that the unevaluated part of the ternary operator does not do evaluation or assignment |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 57 | 20 20 |
58 | 30 30 | ||||
59 | 20 20 | ||||
60 | 30 30 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 61 | check precedence of assignment vs. conditional operator |
62 | ./arith.tests: line 116: arithmetic syntax error | ||||
63 | check precedence of assignment vs. conditional operator | ||||
64 | associativity of assignment-operator operator | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 65 | 6 6 |
66 | 6,5,3 6,5,3 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 67 | octal, hex |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 68 | 263 263 |
69 | 255 255 | ||||
70 | 40 40 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 71 | other bases |
72 | 10 10 | ||||
73 | 10 10 | ||||
74 | 10 10 | ||||
75 | 10 10 | ||||
76 | 10 10 | ||||
77 | 10 10 | ||||
78 | 36 36 | ||||
79 | 36 36 | ||||
80 | 62 62 | ||||
81 | 63 63 | ||||
82 | missing number after base | ||||
83 | 0 0 | ||||
84 | ./arith.tests: line 162: arithmetic syntax error | ||||
85 | ./arith.tests: line 164: divide by zero | ||||
86 | ./arith.tests: let: line 165: arithmetic syntax error | ||||
87 | ./arith.tests: line 166: arithmetic syntax error | ||||
88 | ./arith.tests: let: line 167: arithmetic syntax error | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 89 | abc |
90 | def | ||||
91 | ghi | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 92 | ./arith.tests: line 190: arithmetic syntax error |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 93 | 16 16 |
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 94 | ./arith.tests: line 195: arithmetic syntax error |
95 | ./arith.tests: line 196: malformed ?: operator | ||||
96 | ./arith.tests: line 197: arithmetic syntax error | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 97 | 9 9 |
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 98 | ./arith.tests: line 204: arithmetic syntax error |
99 | ./arith.tests: line 207: arithmetic syntax error | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 100 | 9 9 |
101 | 9 9 | ||||
102 | 9 9 | ||||
103 | 7 7 | ||||
104 | 7 | ||||
105 | 4 4 | ||||
106 | 32767 32767 | ||||
107 | 32768 32768 | ||||
108 | 131072 131072 | ||||
109 | 2147483647 2147483647 | ||||
110 | 1 1 | ||||
111 | 4 4 | ||||
112 | 4 4 | ||||
113 | 5 5 | ||||
114 | 5 5 | ||||
115 | 4 4 | ||||
116 | 3 3 | ||||
117 | 3 3 | ||||
118 | 4 4 | ||||
119 | 4 4 | ||||
Denys Vlasenko | d84a604 | 2021-09-25 22:04:45 +0200 | [diff] [blame] | 120 | 7 7 |
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 121 | ./arith.tests: line 256: arithmetic syntax error |
122 | ./arith.tests: line 258: arithmetic syntax error | ||||
Denys Vlasenko | 063847d | 2010-09-15 13:33:02 +0200 | [diff] [blame] | 123 | ./arith.tests: line 259: arithmetic syntax error |
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 124 | ./arith.tests: line 261: arithmetic syntax error |
Denys Vlasenko | 063847d | 2010-09-15 13:33:02 +0200 | [diff] [blame] | 125 | ./arith.tests: line 262: arithmetic syntax error |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 126 | 4 4 |
127 | 7 7 | ||||
128 | -7 -7 | ||||
Denys Vlasenko | d84a604 | 2021-09-25 22:04:45 +0200 | [diff] [blame] | 129 | 7 |
130 | 7 | ||||
Denys Vlasenko | 063847d | 2010-09-15 13:33:02 +0200 | [diff] [blame] | 131 | ./arith1.sub: line 2: arithmetic syntax error |
132 | ./arith1.sub: line 3: arithmetic syntax error | ||||
133 | ./arith1.sub: line 4: arithmetic syntax error | ||||
134 | ./arith1.sub: line 5: arithmetic syntax error | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 135 | 6 6 |
136 | 3 3 | ||||
137 | 7 7 | ||||
138 | 4 4 | ||||
139 | 0 0 | ||||
140 | 3 3 | ||||
141 | 7 7 | ||||
142 | 2 2 | ||||
143 | -2 -2 | ||||
144 | 1 1 | ||||
Denys Vlasenko | d84a604 | 2021-09-25 22:04:45 +0200 | [diff] [blame] | 145 | 7 |
146 | 7 | ||||
147 | 7 | ||||
148 | 7 | ||||
149 | 7 | ||||
150 | 7 | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 151 | 5 5 |
152 | 1 1 | ||||
Denys Vlasenko | f19e3c1 | 2018-01-28 20:13:33 +0100 | [diff] [blame] | 153 | 6 6 |
154 | 2 2 | ||||
155 | 3 3 | ||||
156 | 1 1 | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 157 | 4 4 |
158 | 0 0 | ||||
Denys Vlasenko | d84a604 | 2021-09-25 22:04:45 +0200 | [diff] [blame] | 159 | -7 |
160 | -7 | ||||
161 | 7 | ||||
162 | 7 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 163 | -7 -7 |
164 | -7 -7 | ||||
165 | 7 7 | ||||
166 | 7 7 | ||||
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 167 | 8 12 |
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 168 | ./arith.tests: line 289: arithmetic syntax error |
Denis Vlasenko | 1c660b4 | 2007-03-05 00:27:50 +0000 | [diff] [blame] | 169 | 42 |
170 | 42 | ||||
171 | 42 | ||||
Denys Vlasenko | 62e4331 | 2021-09-25 22:25:19 +0200 | [diff] [blame] | 172 | ./arith.tests: line 301: a[b[c]d]=e: not found |