Skip to content

Commit 5893e38

Browse files
committed
C++: Accept test changes.
1 parent 0a550bb commit 5893e38

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

cpp/ql/test/library-tests/controlflow/guards-ir/tests.expected

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ astGuardsCompare
160160
| 137 | 0 == 0 when 0 is false |
161161
| 146 | ! ... != 0 when ! ... is true |
162162
| 146 | ! ... == 0 when ! ... is false |
163+
| 146 | x != 0 when ! ... is false |
164+
| 146 | x != 0 when x is true |
165+
| 146 | x == 0 when x is false |
163166
| 152 | x != 0 when ... && ... is true |
164167
| 152 | x != 0 when x is true |
165168
| 152 | x == 0 when x is false |
@@ -518,6 +521,7 @@ astGuardsEnsure_const
518521
| test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 |
519522
| test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 |
520523
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 |
524+
| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
521525
| test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 151 | 152 |
522526
| test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 152 | 152 |
523527
| test.c:152:10:152:15 | ... && ... | test.c:152:10:152:10 | x | != | 0 | 151 | 152 |
@@ -689,6 +693,9 @@ irGuardsCompare
689693
| 137 | 0 == 0 when Constant: 0 is false |
690694
| 146 | ! ... != 0 when LogicalNot: ! ... is true |
691695
| 146 | ! ... == 0 when LogicalNot: ! ... is false |
696+
| 146 | x != 0 when Load: x is true |
697+
| 146 | x != 0 when LogicalNot: ! ... is false |
698+
| 146 | x == 0 when Load: x is false |
692699
| 152 | x != 0 when Load: x is true |
693700
| 152 | x == 0 when Load: x is false |
694701
| 152 | y != 0 when Load: y is true |
@@ -1063,6 +1070,7 @@ irGuardsEnsure_const
10631070
| test.c:131:7:131:7 | Load: b | test.c:131:7:131:7 | Load: b | != | 0 | 132 | 132 |
10641071
| test.c:137:7:137:7 | Constant: 0 | test.c:137:7:137:7 | Constant: 0 | == | 0 | 142 | 142 |
10651072
| test.c:146:7:146:8 | LogicalNot: ! ... | test.c:146:7:146:8 | LogicalNot: ! ... | != | 0 | 147 | 147 |
1073+
| test.c:146:8:146:8 | Load: x | test.c:146:8:146:8 | Load: x | == | 0 | 147 | 147 |
10661074
| test.c:152:10:152:10 | Load: x | test.c:152:10:152:10 | Load: x | != | 0 | 152 | 152 |
10671075
| test.c:152:15:152:15 | Load: y | test.c:152:15:152:15 | Load: y | != | 0 | 152 | 152 |
10681076
| test.c:175:13:175:32 | CompareEQ: ... == ... | test.c:175:13:175:15 | Call: call to foo | != | 0 | 175 | 175 |

cpp/ql/test/library-tests/controlflow/guards/GuardsCompare.expected

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,20 @@
161161
| 137 | 0 == 0 when 0 is false |
162162
| 146 | ! ... != 0 when ! ... is true |
163163
| 146 | ! ... == 0 when ! ... is false |
164+
| 146 | x != 0 when ! ... is false |
165+
| 146 | x != 0 when x is true |
166+
| 146 | x == 0 when x is false |
164167
| 152 | p != 0 when p is true |
165168
| 152 | p == 0 when p is false |
166169
| 158 | ! ... != 0 when ! ... is true |
167170
| 158 | ! ... == 0 when ! ... is false |
171+
| 158 | p != 0 when ! ... is false |
172+
| 158 | p != 0 when p is true |
173+
| 158 | p == 0 when p is false |
168174
| 164 | s != 0 when s is true |
169175
| 164 | s == 0 when s is false |
170176
| 170 | ! ... != 0 when ! ... is true |
171177
| 170 | ! ... == 0 when ! ... is false |
178+
| 170 | s != 0 when ! ... is false |
179+
| 170 | s != 0 when s is true |
180+
| 170 | s == 0 when s is false |

cpp/ql/test/library-tests/controlflow/guards/GuardsEnsure.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,13 @@ unary
245245
| test.c:131:7:131:7 | b | test.c:131:7:131:7 | b | != | 0 | 131 | 132 |
246246
| test.c:137:7:137:7 | 0 | test.c:137:7:137:7 | 0 | == | 0 | 142 | 136 |
247247
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 |
248+
| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
248249
| test.c:152:8:152:8 | p | test.c:152:8:152:8 | p | != | 0 | 152 | 154 |
249250
| test.c:158:8:158:9 | ! ... | test.c:158:8:158:9 | ! ... | != | 0 | 158 | 160 |
251+
| test.c:158:9:158:9 | p | test.c:158:9:158:9 | p | == | 0 | 158 | 160 |
250252
| test.c:164:8:164:8 | s | test.c:164:8:164:8 | s | != | 0 | 164 | 166 |
251253
| test.c:170:8:170:9 | ! ... | test.c:170:8:170:9 | ! ... | != | 0 | 170 | 172 |
254+
| test.c:170:9:170:9 | s | test.c:170:9:170:9 | s | == | 0 | 170 | 172 |
252255
| test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | != | 0 | 19 | 19 |
253256
| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 30 | 30 |
254257
| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 34 | 34 |

0 commit comments

Comments
 (0)