Skip to content

Commit 27040be

Browse files
committed
C++: Hashcons tests for ArrayExpr
1 parent 7ea4582 commit 27040be

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

cpp/ql/test/library-tests/valuenumbering/HashCons/HashCons.expected

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
| test.cpp:43:7:43:24 | ... + ... | 43:c7-c24 45:c7-c24 |
2222
| test.cpp:43:12:43:13 | p1 | 43:c12-c13 45:c12-c13 |
2323
| test.cpp:43:17:43:24 | global03 | 43:c17-c24 45:c17-c24 |
24-
| test.cpp:44:9:44:9 | 0 | 44:c9-c9 51:c25-c25 88:c12-c12 |
2524
| test.cpp:53:10:53:13 | (int)... | 53:c10-c13 56:c21-c24 |
2625
| test.cpp:53:10:53:13 | * ... | 53:c10-c13 56:c21-c24 |
2726
| test.cpp:53:11:53:13 | str | 53:c11-c13 56:c22-c24 |
@@ -38,7 +37,7 @@
3837
| test.cpp:92:11:92:11 | x | 92:c11-c11 93:c10-c10 |
3938
| test.cpp:97:3:97:3 | x | 97:c3-c3 98:c3-c3 |
4039
| test.cpp:97:3:97:5 | ... ++ | 97:c3-c5 98:c3-c5 |
41-
| test.cpp:103:10:103:11 | 1 | 103:c10-c11 104:c7-c7 107:c7-c7 108:c7-c7 10:c16-c16 179:c21-c21 247:c11-c11 248:c11-c11 271:c28-c28 272:c28-c28 274:c19-c19 274:c22-c22 288:c5-c5 292:c5-c5 297:c5-c5 302:c9-c9 303:c9-c9 |
40+
| test.cpp:103:10:103:11 | 1 | 103:c10-c11 104:c7-c7 107:c7-c7 108:c7-c7 10:c16-c16 179:c21-c21 247:c11-c11 248:c11-c11 271:c28-c28 272:c28-c28 274:c19-c19 274:c22-c22 288:c5-c5 292:c5-c5 297:c5-c5 302:c9-c9 303:c9-c9 313:c5-c5 314:c5-c5 316:c5-c5 |
4241
| test.cpp:104:3:104:3 | x | 104:c3-c3 105:c3-c3 106:c3-c3 107:c3-c3 108:c3-c3 |
4342
| test.cpp:105:7:105:7 | 2 | 105:c7-c7 106:c7-c7 107:c11-c11 108:c11-c11 21:c16-c16 249:c11-c11 271:c24-c24 271:c31-c31 272:c24-c24 272:c31-c31 273:c24-c24 274:c15-c15 275:c15-c15 275:c19-c19 275:c22-c22 277:c15-c15 278:c15-c15 289:c5-c5 293:c5-c5 296:c5-c5 304:c9-c9 305:c9-c9 |
4443
| test.cpp:107:7:107:11 | ... + ... | 107:c7-c11 108:c7-c11 |
@@ -107,3 +106,8 @@
107106
| test.cpp:302:3:302:9 | throw ... | 302:c3-c9 303:c3-c9 |
108107
| test.cpp:304:3:304:9 | throw ... | 304:c3-c9 305:c3-c9 |
109108
| test.cpp:306:3:306:7 | re-throw exception | 306:c3-c7 307:c3-c7 |
109+
| test.cpp:311:3:311:3 | x | 311:c3-c3 312:c3-c3 313:c3-c3 314:c3-c3 |
110+
| test.cpp:311:3:311:6 | access to array | 311:c3-c6 312:c3-c6 |
111+
| test.cpp:311:5:311:5 | 0 | 311:c5-c5 312:c5-c5 315:c5-c5 44:c9-c9 51:c25-c25 88:c12-c12 |
112+
| test.cpp:313:3:313:6 | access to array | 313:c3-c6 314:c3-c6 |
113+
| test.cpp:315:3:315:3 | y | 315:c3-c3 316:c3-c3 |

cpp/ql/test/library-tests/valuenumbering/HashCons/test.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,12 @@ void test18() {
306306
throw;
307307
throw;
308308
}
309+
310+
void test19(int *x, int *y) {
311+
x[0];
312+
x[0];
313+
x[1];
314+
x[1];
315+
y[0];
316+
y[1];
317+
}

0 commit comments

Comments
 (0)