Skip to content

Commit e91987b

Browse files
committed
C++: Accept test changes.
1 parent d544f47 commit e91987b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cpp/ql/test/library-tests/ir/range-analysis/SimpleRangeAnalysis_tests.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int test2(struct List* p) {
1818
int count = 0;
1919
for (; p; p = p->next) {
2020
count = (count+1) % 10;
21-
range(count); // $ range=<=9 range=>=-9 range="<=Phi: p | Store: count+1"
21+
range(count); // $ range=<=9 range=>=-9
2222
}
2323
range(count); // $ range=>=-9 range=<=9
2424
return count;
@@ -29,7 +29,7 @@ int test3(struct List* p) {
2929
for (; p; p = p->next) {
3030
range(count++); // $ range=>=-9 range=<=9
3131
count = count % 10;
32-
range(count); // $ range=<=9 range=>=-9 range="<=Store: ... +++0" range="<=Phi: p | Store: count+1"
32+
range(count); // $ range=<=9 range=>=-9
3333
}
3434
range(count); // $ range=>=-9 range=<=9
3535
return count;
@@ -317,7 +317,7 @@ int test_mult01(int a, int b) {
317317
range(b); // $ range=<=23 range=>=-13
318318
int r = a*b; // $ overflow=+- -143 .. 253
319319
range(r);
320-
total += r; // $ overflow=+
320+
total += r; // $ overflow=+-
321321
range(total); // $ MISSING: range=">=... * ...+0"
322322
}
323323
if (3 <= a && a <= 11 && -13 <= b && b <= 0) {
@@ -365,7 +365,7 @@ int test_mult02(int a, int b) {
365365
range(b); // $ range=<=23 range=>=-13
366366
int r = a*b; // $ overflow=+- -143 .. 253
367367
range(r);
368-
total += r; // $ overflow=+
368+
total += r; // $ overflow=+-
369369
range(total); // $ MISSING: range=">=... * ...+0"
370370
}
371371
if (0 <= a && a <= 11 && -13 <= b && b <= 0) {
@@ -460,7 +460,7 @@ int test_mult04(int a, int b) {
460460
range(b); // $ range=<=23 range=>=-13
461461
int r = a*b; // $ overflow=+- -391 .. 221
462462
range(r);
463-
total += r; // $ overflow=-
463+
total += r; // $ overflow=+-
464464
range(total); // $ MISSING: range="<=... * ...+0"
465465
}
466466
if (-17 <= a && a <= 0 && -13 <= b && b <= 0) {
@@ -508,7 +508,7 @@ int test_mult05(int a, int b) {
508508
range(b); // $ range=<=23 range=>=-13
509509
int r = a*b; // $ overflow=+- -391 .. 221
510510
range(r);
511-
total += r; // $ overflow=-
511+
total += r; // $ overflow=+-
512512
range(total); // $ MISSING: range="<=... * ...+0"
513513
}
514514
if (-17 <= a && a <= -2 && -13 <= b && b <= 0) {
@@ -974,7 +974,7 @@ void test_mod_neg(int s) {
974974

975975
void test_mod_ternary(int s, bool b) {
976976
int s2 = s % (b ? 5 : 500);
977-
range(s2); // $ range=>=-499 range=<=499 range="<=Phi: ... ? ... : ...-1"
977+
range(s2); // $ range=>=-499 range=<=499
978978
}
979979

980980
void test_mod_ternary2(int s, bool b1, bool b2) {

0 commit comments

Comments
 (0)