Commit 1a4f16d
committed
🐛 Fix printing variables when expect or assert fails
Problem:
- EXPECT and ASSERT macros only print whether the expression is true or
false when the test expectations fail
- GUnit stopped printing out the values of the variables used in the
expressiong passed to the EXPECT or ASSERT macros
- Fix for logical expression broke variable printing
Solution:
- Remove extra parenthesis in macros that resulted in full evaluation of
the expression before the op and cmp objects could be initialized.
- Add CmpHelperAnd/Or/Xor with corresponding and/or/xor overloads to
allow evaluating logical expressions.
- Added test to verify tested expressions are only evaluated once.1 parent 8f5e27c commit 1a4f16d
2 files changed
+72
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
20 | 50 | | |
21 | 51 | | |
22 | 52 | | |
| |||
127 | 157 | | |
128 | 158 | | |
129 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
130 | 181 | | |
131 | 182 | | |
132 | 183 | | |
| |||
213 | 264 | | |
214 | 265 | | |
215 | 266 | | |
216 | | - | |
| 267 | + | |
217 | 268 | | |
218 | 269 | | |
219 | 270 | | |
| |||
223 | 274 | | |
224 | 275 | | |
225 | 276 | | |
226 | | - | |
| 277 | + | |
227 | 278 | | |
228 | 279 | | |
229 | 280 | | |
230 | 281 | | |
231 | 282 | | |
232 | 283 | | |
233 | | - | |
| 284 | + | |
234 | 285 | | |
235 | 286 | | |
236 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
| |||
16 | 30 | | |
17 | 31 | | |
18 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
19 | 37 | | |
20 | 38 | | |
21 | 39 | | |
| |||
0 commit comments