Skip to content

Commit 50559d5

Browse files
committed
C++: Accept test output change
The new output looks correct, although I'm not sure if it's correct for the right reasons.
1 parent b827e7a commit 50559d5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cpp/ql/test/query-tests/Likely Bugs/Arithmetic/PointlessComparison/PointlessComparison.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ enum my_enum {
207207
};
208208

209209
int myFunction6(enum my_enum e) {
210-
if (e < 0) {
210+
if (e < 0) { // BAD
211211
return 1;
212212
}
213213
return 0;

cpp/ql/test/query-tests/Likely Bugs/Arithmetic/PointlessComparison/PointlessComparison.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
| PointlessComparison.c:126:12:126:18 | ... >= ... | Comparison is always true because a >= 20. |
3232
| PointlessComparison.c:129:12:129:16 | ... > ... | Comparison is always false because a <= 3. |
3333
| PointlessComparison.c:197:7:197:11 | ... < ... | Comparison is always false because x >= 0. |
34+
| PointlessComparison.c:210:6:210:10 | ... < ... | Comparison is always false because e >= 0. |
3435
| PointlessComparison.c:264:12:264:22 | ... >= ... | Comparison is always true because dbl >= 0 and -0 >= - .... |
3536
| RegressionTests.cpp:57:7:57:22 | ... <= ... | Comparison is always true because * ... <= 4294967295. |
3637
| Templates.cpp:9:10:9:24 | ... <= ... | Comparison is always true because local <= 32767. |

0 commit comments

Comments
 (0)