Skip to content

Commit 72d9812

Browse files
committed
C++: Accept more test changes.
1 parent dfefd62 commit 72d9812

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

cpp/ql/test/library-tests/ir/modulus-analysis/test.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void m(int i, bool cond, int x, int y) {
1010

1111
int seven = 7;
1212
if (mul % c2 == seven) {
13-
mod(mul); // congruent 3 mod 42, 7 mod 43
13+
mod(mul); // $ mod=0,3,42
1414
}
1515

1616
int j = cond
@@ -19,13 +19,11 @@ void m(int i, bool cond, int x, int y) {
1919
mod(j); // $ mod=0,3,4
2020

2121
if (x % c1 == 3 && y % c1 == 7) {
22-
// Need implies_v2
23-
mod(x + y); // $ MISSING: 0,10,42
22+
mod(x + y); // $ mod=0,10,42
2423
}
2524

2625
if (x % c1 == 3 && y % c1 == 7) {
27-
// Need implies_v2
28-
mod(x - y); // $ MISSING: mod=0,38,42
26+
mod(x - y); // $ mod=0,38,42
2927
}
3028

3129
if (cond) {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,12 +1008,12 @@ void test(int x) {
10081008

10091009
void test_overflow() {
10101010
const int x = 2147483647; // 2^31-1
1011-
range(x);
1011+
range(x); // $ range===2147483647
10121012
const int y = 256;
1013-
range(y);
1013+
range(y); // $ range===256
10141014
if ((x + y) <= 512) {
1015-
range(x);
1016-
range(y);
1015+
range(x); // $ range===2147483647
1016+
range(y); // $ range===256
10171017
range(x + y); // $ range===-2147483393
10181018
}
10191019
}

0 commit comments

Comments
 (0)