Skip to content

Commit ca71ac7

Browse files
committed
C++: Accept improved test output
1 parent fd4967e commit ca71ac7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ int unsigned_implicit_conversion(unsigned int ui1) {
300300

301301
int signedness_cast1(u8 c) {
302302
if ((signed char)c == 0) {
303-
if (c >= 5) { // BAD [NOT DETECTED]
303+
if (c >= 5) { // BAD
304304
return 1;
305305
}
306306
}
@@ -309,7 +309,7 @@ int signedness_cast1(u8 c) {
309309

310310
int signedness_cast2(signed char c) {
311311
if ((u8)c == 0) {
312-
if (c >= 5) { // BAD [NOT DETECTED]
312+
if (c >= 5) { // BAD
313313
return 1;
314314
}
315315
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
| PointlessComparison.c:273:9:273:18 | ... > ... | Comparison is always false because c <= 0. |
3636
| PointlessComparison.c:283:13:283:19 | ... >= ... | Comparison is always true because c >= 11. |
3737
| PointlessComparison.c:294:9:294:16 | ... >= ... | Comparison is always false because ui1 <= 0. |
38+
| PointlessComparison.c:303:9:303:14 | ... >= ... | Comparison is always false because c <= 0. |
39+
| PointlessComparison.c:312:9:312:14 | ... >= ... | Comparison is always false because c <= 0. |
3840
| PointlessComparison.c:337:14:337:21 | ... >= ... | Comparison is always true because x >= 0. |
3941
| RegressionTests.cpp:57:7:57:22 | ... <= ... | Comparison is always true because * ... <= 4294967295. |
4042
| Templates.cpp:9:10:9:24 | ... <= ... | Comparison is always true because local <= 32767. |

0 commit comments

Comments
 (0)