Skip to content

Commit a044f54

Browse files
committed
fix outdated changed start state tests
1 parent 18c4a3c commit a044f54

File tree

4 files changed

+30
-26
lines changed

4 files changed

+30
-26
lines changed

tests/incremental/00-basic/02-changed_start_state1.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ int g = 1;
44

55
int main() {
66
// After the presolve phase, g is in the start state but neither in the context nor in the start variables.
7-
// If the start state of main is not overwriten when main is destabilized because of a changed start state,
8-
// the first assert will wrongly succeed and the second fail in the incremental run
9-
assert(g == 1); // SUCCESS
10-
assert(g == 2); // FAIL
7+
// If the change of the start state of main would not be propagated by the call to side on all start variables, the
8+
// asserts in the incremental run would wrongly fail. Side however only joins with the previous value instead of
9+
// overwriting, therefore the current imprecision.
10+
assert(g == 1);
11+
assert(g != 2);
1112
return 0;
1213
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
--- a/tests/incremental/02-changed_start_state.c
2-
+++ b/tests/incremental/02-changed_start_state.c
3-
@@ -1,12 +1,12 @@
1+
--- a/tests/incremental/00-basic/02-changed_start_state1.c
2+
+++ b/tests/incremental/00-basic/02-changed_start_state1.c
3+
@@ -1,13 +1,13 @@
44
#include <assert.h>
55

66
-int g = 1;
77
+int g = 2;
88

99
int main() {
1010
// After the presolve phase, g is in the start state but neither in the context nor in the start variables.
11-
// If the start state of main is not overwriten when main is destabilized because of a changed start state,
12-
// the first assert will wrongly succeed and the second fail in the incremental run
13-
- assert(g == 1); // SUCCESS
14-
- assert(g == 2); // FAIL
15-
+ assert(g == 1); // UNKNOWN
16-
+ assert(g == 2); // UNKNOWN
11+
// If the change of the start state of main would not be propagated by the call to side on all start variables, the
12+
// asserts in the incremental run would wrongly fail. Side however only joins with the previous value instead of
13+
// overwriting, therefore the current imprecision.
14+
- assert(g == 1);
15+
- assert(g != 2);
16+
+ assert(g != 1); // TODO (restarting)
17+
+ assert(g == 2); // TODO
1718
return 0;
1819
}

tests/incremental/00-basic/03-changed_start_state2.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ int g = 1;
44

55
int main() {
66
// After the presolve phase, g is in the start state but neither in the context nor in the start variables.
7-
// If the start state of main is not overwriten when main is destabilized because of a changed start state,
8-
// the first assert will wrongly succeed and the second fail in the incremental run
9-
assert(g == 1); // SUCCESS
10-
assert(g == 2); // FAIL
7+
// If the change of the start state of main would not be propagated by the call to side on all start variables, the
8+
// asserts in the incremental run would wrongly fail. Side however only joins with the previous value instead of
9+
// overwriting, therefore the current imprecision.
10+
assert(g == 1);
11+
assert(g != 2);
1112
return 0;
1213
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
--- a/tests/incremental/03-changed_start_state.c
2-
+++ b/tests/incremental/03-changed_start_state.c
3-
@@ -1,12 +1,12 @@
1+
--- a/tests/incremental/00-basic/03-changed_start_state2.c
2+
+++ b/tests/incremental/00-basic/03-changed_start_state2.c
3+
@@ -1,13 +1,13 @@
44
#include <assert.h>
55

66
-int g = 1;
77
+int g = 2;
88

99
int main() {
1010
// After the presolve phase, g is in the start state but neither in the context nor in the start variables.
11-
// If the start state of main is not overwriten when main is destabilized because of a changed start state,
12-
// the first assert will wrongly succeed and the second fail in the incremental run
13-
- assert(g == 1); // SUCCESS
14-
- assert(g == 2); // FAIL
15-
+ assert(g == 1); // FAIL
16-
+ assert(g == 2); // SUCCESS
11+
// If the change of the start state of main would not be propagated by the call to side on all start variables, the
12+
// asserts in the incremental run would wrongly fail. Side however only joins with the previous value instead of
13+
// overwriting, therefore the current imprecision.
14+
- assert(g == 1);
15+
- assert(g != 2);
16+
+ assert(g != 1); // TODO (restarting)
17+
+ assert(g == 2); // TODO
1718
return 0;
1819
}

0 commit comments

Comments
 (0)