Skip to content

Commit 7cca213

Browse files
committed
C++: Accept test changes.
1 parent 14db788 commit 7cca213

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

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

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ astGuards
2626
| test.c:131:7:131:7 | b |
2727
| test.c:137:7:137:7 | 0 |
2828
| test.c:146:7:146:8 | ! ... |
29+
| test.c:146:8:146:8 | x |
2930
| test.c:152:10:152:10 | x |
3031
| test.c:152:10:152:15 | ... && ... |
3132
| test.c:152:15:152:15 | y |
@@ -266,7 +267,9 @@ astGuardsCompare
266267
| 146 | ! ... == 0 when ! ... is false |
267268
| 146 | ! ... == 1 when ! ... is true |
268269
| 146 | x != 0 when ! ... is false |
270+
| 146 | x != 0 when x is true |
269271
| 146 | x == 0 when ! ... is true |
272+
| 146 | x == 0 when x is false |
270273
| 152 | x != 0 when ... && ... is true |
271274
| 152 | x != 0 when x is true |
272275
| 152 | x != 1 when x is false |
@@ -422,6 +425,7 @@ astGuardsControl
422425
| test.c:131:7:131:7 | b | true | 131 | 132 |
423426
| test.c:137:7:137:7 | 0 | false | 142 | 136 |
424427
| test.c:146:7:146:8 | ! ... | true | 146 | 147 |
428+
| test.c:146:8:146:8 | x | false | 146 | 147 |
425429
| test.c:152:10:152:10 | x | true | 151 | 152 |
426430
| test.c:152:10:152:10 | x | true | 152 | 152 |
427431
| test.c:152:10:152:15 | ... && ... | true | 151 | 152 |
@@ -837,6 +841,7 @@ astGuardsEnsure_const
837841
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 |
838842
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | == | 1 | 146 | 147 |
839843
| test.c:146:7:146:8 | ! ... | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
844+
| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
840845
| test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 151 | 152 |
841846
| test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | != | 0 | 152 | 152 |
842847
| test.c:152:10:152:10 | x | test.c:152:10:152:10 | x | == | 1 | 151 | 152 |

Diff for: cpp/ql/test/library-tests/controlflow/guards/Guards.expected

+3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
| test.c:131:7:131:7 | b |
2626
| test.c:137:7:137:7 | 0 |
2727
| test.c:146:7:146:8 | ! ... |
28+
| test.c:146:8:146:8 | x |
2829
| test.c:152:8:152:8 | p |
2930
| test.c:158:8:158:9 | ! ... |
31+
| test.c:158:9:158:9 | p |
3032
| test.c:164:8:164:8 | s |
3133
| test.c:170:8:170:9 | ! ... |
34+
| test.c:170:9:170:9 | s |
3235
| test.cpp:18:8:18:10 | call to get |
3336
| test.cpp:31:7:31:13 | ... == ... |
3437
| test.cpp:42:13:42:20 | call to getABool |

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

+6
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@
342342
| 146 | ! ... == 0 when ! ... is false |
343343
| 146 | ! ... == 1 when ! ... is true |
344344
| 146 | x != 0 when ! ... is false |
345+
| 146 | x != 0 when x is true |
345346
| 146 | x == 0 when ! ... is true |
347+
| 146 | x == 0 when x is false |
346348
| 152 | p != 0 when p is true |
347349
| 152 | p != 1 when p is false |
348350
| 152 | p == 0 when p is false |
@@ -352,7 +354,9 @@
352354
| 158 | ! ... == 0 when ! ... is false |
353355
| 158 | ! ... == 1 when ! ... is true |
354356
| 158 | p != 0 when ! ... is false |
357+
| 158 | p != 0 when p is true |
355358
| 158 | p == 0 when ! ... is true |
359+
| 158 | p == 0 when p is false |
356360
| 164 | s != 0 when s is true |
357361
| 164 | s != 1 when s is false |
358362
| 164 | s == 0 when s is false |
@@ -362,4 +366,6 @@
362366
| 170 | ! ... == 0 when ! ... is false |
363367
| 170 | ! ... == 1 when ! ... is true |
364368
| 170 | s != 0 when ! ... is false |
369+
| 170 | s != 0 when s is true |
365370
| 170 | s == 0 when ! ... is true |
371+
| 170 | s == 0 when s is false |

Diff for: cpp/ql/test/library-tests/controlflow/guards/GuardsControl.expected

+3
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@
7878
| test.c:131:7:131:7 | b | true | 131 | 132 |
7979
| test.c:137:7:137:7 | 0 | false | 142 | 136 |
8080
| test.c:146:7:146:8 | ! ... | true | 146 | 147 |
81+
| test.c:146:8:146:8 | x | false | 146 | 147 |
8182
| test.c:152:8:152:8 | p | true | 152 | 154 |
8283
| test.c:158:8:158:9 | ! ... | true | 158 | 160 |
84+
| test.c:158:9:158:9 | p | false | 158 | 160 |
8385
| test.c:164:8:164:8 | s | true | 164 | 166 |
8486
| test.c:170:8:170:9 | ! ... | true | 170 | 172 |
87+
| test.c:170:9:170:9 | s | false | 170 | 172 |
8588
| test.cpp:18:8:18:10 | call to get | true | 19 | 19 |
8689
| test.cpp:31:7:31:13 | ... == ... | false | 30 | 30 |
8790
| test.cpp:31:7:31:13 | ... == ... | false | 34 | 34 |

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

+3
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,19 @@ unary
442442
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | != | 0 | 146 | 147 |
443443
| test.c:146:7:146:8 | ! ... | test.c:146:7:146:8 | ! ... | == | 1 | 146 | 147 |
444444
| test.c:146:7:146:8 | ! ... | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
445+
| test.c:146:8:146:8 | x | test.c:146:8:146:8 | x | == | 0 | 146 | 147 |
445446
| test.c:152:8:152:8 | p | test.c:152:8:152:8 | p | != | 0 | 152 | 154 |
446447
| test.c:152:8:152:8 | p | test.c:152:8:152:8 | p | == | 1 | 152 | 154 |
447448
| test.c:158:8:158:9 | ! ... | test.c:158:8:158:9 | ! ... | != | 0 | 158 | 160 |
448449
| test.c:158:8:158:9 | ! ... | test.c:158:8:158:9 | ! ... | == | 1 | 158 | 160 |
449450
| test.c:158:8:158:9 | ! ... | test.c:158:9:158:9 | p | == | 0 | 158 | 160 |
451+
| test.c:158:9:158:9 | p | test.c:158:9:158:9 | p | == | 0 | 158 | 160 |
450452
| test.c:164:8:164:8 | s | test.c:164:8:164:8 | s | != | 0 | 164 | 166 |
451453
| test.c:164:8:164:8 | s | test.c:164:8:164:8 | s | == | 1 | 164 | 166 |
452454
| test.c:170:8:170:9 | ! ... | test.c:170:8:170:9 | ! ... | != | 0 | 170 | 172 |
453455
| test.c:170:8:170:9 | ! ... | test.c:170:8:170:9 | ! ... | == | 1 | 170 | 172 |
454456
| test.c:170:8:170:9 | ! ... | test.c:170:9:170:9 | s | == | 0 | 170 | 172 |
457+
| test.c:170:9:170:9 | s | test.c:170:9:170:9 | s | == | 0 | 170 | 172 |
455458
| test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | != | 0 | 19 | 19 |
456459
| test.cpp:18:8:18:10 | call to get | test.cpp:18:8:18:10 | call to get | == | 1 | 19 | 19 |
457460
| test.cpp:31:7:31:13 | ... == ... | test.cpp:31:7:31:7 | x | != | -1 | 30 | 30 |

0 commit comments

Comments
 (0)