Skip to content

Commit 04f87a2

Browse files
committed
Swift: Test layout change.
1 parent c8f35ea commit 04f87a2

File tree

3 files changed

+120
-91
lines changed

3 files changed

+120
-91
lines changed

swift/ql/test/library-tests/dataflow/dataflow/DataFlow.expected

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,22 @@ edges
114114
| test.swift:271:15:271:25 | call to signum() : | test.swift:271:15:271:25 | OptionalEvaluationExpr |
115115
| test.swift:280:31:280:38 | call to source() : | test.swift:280:15:280:38 | ... ? ... : ... |
116116
| test.swift:282:31:282:38 | call to source() : | test.swift:282:15:282:38 | ... ? ... : ... |
117-
| test.swift:302:14:302:26 | (...) [Tuple element at index 1] : | test.swift:306:15:306:15 | t1 [Tuple element at index 1] : |
118-
| test.swift:302:18:302:25 | call to source() : | test.swift:302:14:302:26 | (...) [Tuple element at index 1] : |
119-
| test.swift:306:15:306:15 | t1 [Tuple element at index 1] : | test.swift:306:15:306:18 | .1 |
120-
| test.swift:314:5:314:5 | [post] t1 [Tuple element at index 0] : | test.swift:317:15:317:15 | t1 [Tuple element at index 0] : |
121-
| test.swift:314:12:314:19 | call to source() : | test.swift:314:5:314:5 | [post] t1 [Tuple element at index 0] : |
122-
| test.swift:317:15:317:15 | t1 [Tuple element at index 0] : | test.swift:317:15:317:18 | .0 |
123-
| test.swift:322:14:322:45 | (...) [Tuple element at index 0] : | test.swift:327:15:327:15 | t1 [Tuple element at index 0] : |
124-
| test.swift:322:14:322:45 | (...) [Tuple element at index 0] : | test.swift:331:15:331:15 | t2 [Tuple element at index 0] : |
125-
| test.swift:322:14:322:45 | (...) [Tuple element at index 1] : | test.swift:328:15:328:15 | t1 [Tuple element at index 1] : |
126-
| test.swift:322:14:322:45 | (...) [Tuple element at index 1] : | test.swift:332:15:332:15 | t2 [Tuple element at index 1] : |
127-
| test.swift:322:18:322:25 | call to source() : | test.swift:322:14:322:45 | (...) [Tuple element at index 0] : |
128-
| test.swift:322:31:322:38 | call to source() : | test.swift:322:14:322:45 | (...) [Tuple element at index 1] : |
129-
| test.swift:327:15:327:15 | t1 [Tuple element at index 0] : | test.swift:327:15:327:18 | .0 |
130-
| test.swift:328:15:328:15 | t1 [Tuple element at index 1] : | test.swift:328:15:328:18 | .1 |
131-
| test.swift:331:15:331:15 | t2 [Tuple element at index 0] : | test.swift:331:15:331:18 | .0 |
132-
| test.swift:332:15:332:15 | t2 [Tuple element at index 1] : | test.swift:332:15:332:18 | .1 |
117+
| test.swift:331:14:331:26 | (...) [Tuple element at index 1] : | test.swift:335:15:335:15 | t1 [Tuple element at index 1] : |
118+
| test.swift:331:18:331:25 | call to source() : | test.swift:331:14:331:26 | (...) [Tuple element at index 1] : |
119+
| test.swift:335:15:335:15 | t1 [Tuple element at index 1] : | test.swift:335:15:335:18 | .1 |
120+
| test.swift:343:5:343:5 | [post] t1 [Tuple element at index 0] : | test.swift:346:15:346:15 | t1 [Tuple element at index 0] : |
121+
| test.swift:343:12:343:19 | call to source() : | test.swift:343:5:343:5 | [post] t1 [Tuple element at index 0] : |
122+
| test.swift:346:15:346:15 | t1 [Tuple element at index 0] : | test.swift:346:15:346:18 | .0 |
123+
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | test.swift:356:15:356:15 | t1 [Tuple element at index 0] : |
124+
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | test.swift:360:15:360:15 | t2 [Tuple element at index 0] : |
125+
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | test.swift:357:15:357:15 | t1 [Tuple element at index 1] : |
126+
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | test.swift:361:15:361:15 | t2 [Tuple element at index 1] : |
127+
| test.swift:351:18:351:25 | call to source() : | test.swift:351:14:351:45 | (...) [Tuple element at index 0] : |
128+
| test.swift:351:31:351:38 | call to source() : | test.swift:351:14:351:45 | (...) [Tuple element at index 1] : |
129+
| test.swift:356:15:356:15 | t1 [Tuple element at index 0] : | test.swift:356:15:356:18 | .0 |
130+
| test.swift:357:15:357:15 | t1 [Tuple element at index 1] : | test.swift:357:15:357:18 | .1 |
131+
| test.swift:360:15:360:15 | t2 [Tuple element at index 0] : | test.swift:360:15:360:18 | .0 |
132+
| test.swift:361:15:361:15 | t2 [Tuple element at index 1] : | test.swift:361:15:361:18 | .1 |
133133
nodes
134134
| file://:0:0:0:0 | .a [x] : | semmle.label | .a [x] : |
135135
| file://:0:0:0:0 | .x : | semmle.label | .x : |
@@ -258,26 +258,26 @@ nodes
258258
| test.swift:280:31:280:38 | call to source() : | semmle.label | call to source() : |
259259
| test.swift:282:15:282:38 | ... ? ... : ... | semmle.label | ... ? ... : ... |
260260
| test.swift:282:31:282:38 | call to source() : | semmle.label | call to source() : |
261-
| test.swift:302:14:302:26 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
262-
| test.swift:302:18:302:25 | call to source() : | semmle.label | call to source() : |
263-
| test.swift:306:15:306:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
264-
| test.swift:306:15:306:18 | .1 | semmle.label | .1 |
265-
| test.swift:314:5:314:5 | [post] t1 [Tuple element at index 0] : | semmle.label | [post] t1 [Tuple element at index 0] : |
266-
| test.swift:314:12:314:19 | call to source() : | semmle.label | call to source() : |
267-
| test.swift:317:15:317:15 | t1 [Tuple element at index 0] : | semmle.label | t1 [Tuple element at index 0] : |
268-
| test.swift:317:15:317:18 | .0 | semmle.label | .0 |
269-
| test.swift:322:14:322:45 | (...) [Tuple element at index 0] : | semmle.label | (...) [Tuple element at index 0] : |
270-
| test.swift:322:14:322:45 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
271-
| test.swift:322:18:322:25 | call to source() : | semmle.label | call to source() : |
272-
| test.swift:322:31:322:38 | call to source() : | semmle.label | call to source() : |
273-
| test.swift:327:15:327:15 | t1 [Tuple element at index 0] : | semmle.label | t1 [Tuple element at index 0] : |
274-
| test.swift:327:15:327:18 | .0 | semmle.label | .0 |
275-
| test.swift:328:15:328:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
276-
| test.swift:328:15:328:18 | .1 | semmle.label | .1 |
277-
| test.swift:331:15:331:15 | t2 [Tuple element at index 0] : | semmle.label | t2 [Tuple element at index 0] : |
278-
| test.swift:331:15:331:18 | .0 | semmle.label | .0 |
279-
| test.swift:332:15:332:15 | t2 [Tuple element at index 1] : | semmle.label | t2 [Tuple element at index 1] : |
280-
| test.swift:332:15:332:18 | .1 | semmle.label | .1 |
261+
| test.swift:331:14:331:26 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
262+
| test.swift:331:18:331:25 | call to source() : | semmle.label | call to source() : |
263+
| test.swift:335:15:335:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
264+
| test.swift:335:15:335:18 | .1 | semmle.label | .1 |
265+
| test.swift:343:5:343:5 | [post] t1 [Tuple element at index 0] : | semmle.label | [post] t1 [Tuple element at index 0] : |
266+
| test.swift:343:12:343:19 | call to source() : | semmle.label | call to source() : |
267+
| test.swift:346:15:346:15 | t1 [Tuple element at index 0] : | semmle.label | t1 [Tuple element at index 0] : |
268+
| test.swift:346:15:346:18 | .0 | semmle.label | .0 |
269+
| test.swift:351:14:351:45 | (...) [Tuple element at index 0] : | semmle.label | (...) [Tuple element at index 0] : |
270+
| test.swift:351:14:351:45 | (...) [Tuple element at index 1] : | semmle.label | (...) [Tuple element at index 1] : |
271+
| test.swift:351:18:351:25 | call to source() : | semmle.label | call to source() : |
272+
| test.swift:351:31:351:38 | call to source() : | semmle.label | call to source() : |
273+
| test.swift:356:15:356:15 | t1 [Tuple element at index 0] : | semmle.label | t1 [Tuple element at index 0] : |
274+
| test.swift:356:15:356:18 | .0 | semmle.label | .0 |
275+
| test.swift:357:15:357:15 | t1 [Tuple element at index 1] : | semmle.label | t1 [Tuple element at index 1] : |
276+
| test.swift:357:15:357:18 | .1 | semmle.label | .1 |
277+
| test.swift:360:15:360:15 | t2 [Tuple element at index 0] : | semmle.label | t2 [Tuple element at index 0] : |
278+
| test.swift:360:15:360:18 | .0 | semmle.label | .0 |
279+
| test.swift:361:15:361:15 | t2 [Tuple element at index 1] : | semmle.label | t2 [Tuple element at index 1] : |
280+
| test.swift:361:15:361:18 | .1 | semmle.label | .1 |
281281
subpaths
282282
| test.swift:75:21:75:22 | &... : | test.swift:65:16:65:28 | arg1 : | test.swift:65:1:70:1 | arg2[return] : | test.swift:75:31:75:32 | [post] &... : |
283283
| test.swift:114:19:114:19 | arg : | test.swift:109:9:109:14 | arg : | test.swift:110:12:110:12 | arg : | test.swift:114:12:114:22 | call to ... : |
@@ -345,9 +345,9 @@ subpaths
345345
| test.swift:280:15:280:38 | ... ? ... : ... | test.swift:259:12:259:19 | call to source() : | test.swift:280:15:280:38 | ... ? ... : ... | result |
346346
| test.swift:280:15:280:38 | ... ? ... : ... | test.swift:280:31:280:38 | call to source() : | test.swift:280:15:280:38 | ... ? ... : ... | result |
347347
| test.swift:282:15:282:38 | ... ? ... : ... | test.swift:282:31:282:38 | call to source() : | test.swift:282:15:282:38 | ... ? ... : ... | result |
348-
| test.swift:306:15:306:18 | .1 | test.swift:302:18:302:25 | call to source() : | test.swift:306:15:306:18 | .1 | result |
349-
| test.swift:317:15:317:18 | .0 | test.swift:314:12:314:19 | call to source() : | test.swift:317:15:317:18 | .0 | result |
350-
| test.swift:327:15:327:18 | .0 | test.swift:322:18:322:25 | call to source() : | test.swift:327:15:327:18 | .0 | result |
351-
| test.swift:328:15:328:18 | .1 | test.swift:322:31:322:38 | call to source() : | test.swift:328:15:328:18 | .1 | result |
352-
| test.swift:331:15:331:18 | .0 | test.swift:322:18:322:25 | call to source() : | test.swift:331:15:331:18 | .0 | result |
353-
| test.swift:332:15:332:18 | .1 | test.swift:322:31:322:38 | call to source() : | test.swift:332:15:332:18 | .1 | result |
348+
| test.swift:335:15:335:18 | .1 | test.swift:331:18:331:25 | call to source() : | test.swift:335:15:335:18 | .1 | result |
349+
| test.swift:346:15:346:18 | .0 | test.swift:343:12:343:19 | call to source() : | test.swift:346:15:346:18 | .0 | result |
350+
| test.swift:356:15:356:18 | .0 | test.swift:351:18:351:25 | call to source() : | test.swift:356:15:356:18 | .0 | result |
351+
| test.swift:357:15:357:18 | .1 | test.swift:351:31:351:38 | call to source() : | test.swift:357:15:357:18 | .1 | result |
352+
| test.swift:360:15:360:18 | .0 | test.swift:351:18:351:25 | call to source() : | test.swift:360:15:360:18 | .0 | result |
353+
| test.swift:361:15:361:18 | .1 | test.swift:351:31:351:38 | call to source() : | test.swift:361:15:361:18 | .1 | result |

swift/ql/test/library-tests/dataflow/dataflow/LocalFlow.expected

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -247,44 +247,44 @@
247247
| test.swift:290:16:290:26 | call to signum() | test.swift:290:16:290:26 | OptionalEvaluationExpr |
248248
| test.swift:293:16:293:16 | y | test.swift:293:16:293:17 | ...? |
249249
| test.swift:293:16:293:26 | call to signum() | test.swift:293:16:293:26 | OptionalEvaluationExpr |
250-
| test.swift:302:9:302:9 | SSA def(t1) | test.swift:304:15:304:15 | t1 |
251-
| test.swift:302:14:302:26 | (...) | test.swift:302:9:302:9 | SSA def(t1) |
252-
| test.swift:304:15:304:15 | t1 | test.swift:305:15:305:15 | t1 |
253-
| test.swift:305:15:305:15 | [post] t1 | test.swift:306:15:306:15 | t1 |
254-
| test.swift:305:15:305:15 | t1 | test.swift:306:15:306:15 | t1 |
255-
| test.swift:306:15:306:15 | [post] t1 | test.swift:308:5:308:5 | t1 |
256-
| test.swift:306:15:306:15 | t1 | test.swift:308:5:308:5 | t1 |
257-
| test.swift:308:5:308:5 | [post] t1 | test.swift:310:15:310:15 | t1 |
258-
| test.swift:308:5:308:5 | t1 | test.swift:310:15:310:15 | t1 |
259-
| test.swift:310:15:310:15 | t1 | test.swift:311:15:311:15 | t1 |
260-
| test.swift:311:15:311:15 | [post] t1 | test.swift:312:15:312:15 | t1 |
261-
| test.swift:311:15:311:15 | t1 | test.swift:312:15:312:15 | t1 |
262-
| test.swift:312:15:312:15 | [post] t1 | test.swift:314:5:314:5 | t1 |
263-
| test.swift:312:15:312:15 | t1 | test.swift:314:5:314:5 | t1 |
264-
| test.swift:314:5:314:5 | [post] t1 | test.swift:316:15:316:15 | t1 |
265-
| test.swift:314:5:314:5 | t1 | test.swift:316:15:316:15 | t1 |
266-
| test.swift:316:15:316:15 | t1 | test.swift:317:15:317:15 | t1 |
267-
| test.swift:317:15:317:15 | [post] t1 | test.swift:318:15:318:15 | t1 |
268-
| test.swift:317:15:317:15 | t1 | test.swift:318:15:318:15 | t1 |
269-
| test.swift:322:9:322:9 | SSA def(t1) | test.swift:323:14:323:14 | t1 |
270-
| test.swift:322:14:322:45 | (...) | test.swift:322:9:322:9 | SSA def(t1) |
271-
| test.swift:323:9:323:9 | SSA def(t2) | test.swift:330:15:330:15 | t2 |
272-
| test.swift:323:14:323:14 | t1 | test.swift:323:9:323:9 | SSA def(t2) |
273-
| test.swift:323:14:323:14 | t1 | test.swift:324:21:324:21 | t1 |
274-
| test.swift:324:9:324:17 | SSA def(a) | test.swift:334:15:334:15 | a |
275-
| test.swift:324:9:324:17 | SSA def(b) | test.swift:335:15:335:15 | b |
276-
| test.swift:324:9:324:17 | SSA def(c) | test.swift:336:15:336:15 | c |
277-
| test.swift:324:21:324:21 | t1 | test.swift:324:9:324:17 | SSA def(a) |
278-
| test.swift:324:21:324:21 | t1 | test.swift:324:9:324:17 | SSA def(b) |
279-
| test.swift:324:21:324:21 | t1 | test.swift:324:9:324:17 | SSA def(c) |
280-
| test.swift:324:21:324:21 | t1 | test.swift:326:15:326:15 | t1 |
281-
| test.swift:326:15:326:15 | t1 | test.swift:327:15:327:15 | t1 |
282-
| test.swift:327:15:327:15 | [post] t1 | test.swift:328:15:328:15 | t1 |
283-
| test.swift:327:15:327:15 | t1 | test.swift:328:15:328:15 | t1 |
284-
| test.swift:328:15:328:15 | [post] t1 | test.swift:329:15:329:15 | t1 |
285-
| test.swift:328:15:328:15 | t1 | test.swift:329:15:329:15 | t1 |
286-
| test.swift:330:15:330:15 | t2 | test.swift:331:15:331:15 | t2 |
287-
| test.swift:331:15:331:15 | [post] t2 | test.swift:332:15:332:15 | t2 |
288-
| test.swift:331:15:331:15 | t2 | test.swift:332:15:332:15 | t2 |
289-
| test.swift:332:15:332:15 | [post] t2 | test.swift:333:15:333:15 | t2 |
290-
| test.swift:332:15:332:15 | t2 | test.swift:333:15:333:15 | t2 |
250+
| test.swift:331:9:331:9 | SSA def(t1) | test.swift:333:15:333:15 | t1 |
251+
| test.swift:331:14:331:26 | (...) | test.swift:331:9:331:9 | SSA def(t1) |
252+
| test.swift:333:15:333:15 | t1 | test.swift:334:15:334:15 | t1 |
253+
| test.swift:334:15:334:15 | [post] t1 | test.swift:335:15:335:15 | t1 |
254+
| test.swift:334:15:334:15 | t1 | test.swift:335:15:335:15 | t1 |
255+
| test.swift:335:15:335:15 | [post] t1 | test.swift:337:5:337:5 | t1 |
256+
| test.swift:335:15:335:15 | t1 | test.swift:337:5:337:5 | t1 |
257+
| test.swift:337:5:337:5 | [post] t1 | test.swift:339:15:339:15 | t1 |
258+
| test.swift:337:5:337:5 | t1 | test.swift:339:15:339:15 | t1 |
259+
| test.swift:339:15:339:15 | t1 | test.swift:340:15:340:15 | t1 |
260+
| test.swift:340:15:340:15 | [post] t1 | test.swift:341:15:341:15 | t1 |
261+
| test.swift:340:15:340:15 | t1 | test.swift:341:15:341:15 | t1 |
262+
| test.swift:341:15:341:15 | [post] t1 | test.swift:343:5:343:5 | t1 |
263+
| test.swift:341:15:341:15 | t1 | test.swift:343:5:343:5 | t1 |
264+
| test.swift:343:5:343:5 | [post] t1 | test.swift:345:15:345:15 | t1 |
265+
| test.swift:343:5:343:5 | t1 | test.swift:345:15:345:15 | t1 |
266+
| test.swift:345:15:345:15 | t1 | test.swift:346:15:346:15 | t1 |
267+
| test.swift:346:15:346:15 | [post] t1 | test.swift:347:15:347:15 | t1 |
268+
| test.swift:346:15:346:15 | t1 | test.swift:347:15:347:15 | t1 |
269+
| test.swift:351:9:351:9 | SSA def(t1) | test.swift:352:14:352:14 | t1 |
270+
| test.swift:351:14:351:45 | (...) | test.swift:351:9:351:9 | SSA def(t1) |
271+
| test.swift:352:9:352:9 | SSA def(t2) | test.swift:359:15:359:15 | t2 |
272+
| test.swift:352:14:352:14 | t1 | test.swift:352:9:352:9 | SSA def(t2) |
273+
| test.swift:352:14:352:14 | t1 | test.swift:353:21:353:21 | t1 |
274+
| test.swift:353:9:353:17 | SSA def(a) | test.swift:363:15:363:15 | a |
275+
| test.swift:353:9:353:17 | SSA def(b) | test.swift:364:15:364:15 | b |
276+
| test.swift:353:9:353:17 | SSA def(c) | test.swift:365:15:365:15 | c |
277+
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(a) |
278+
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(b) |
279+
| test.swift:353:21:353:21 | t1 | test.swift:353:9:353:17 | SSA def(c) |
280+
| test.swift:353:21:353:21 | t1 | test.swift:355:15:355:15 | t1 |
281+
| test.swift:355:15:355:15 | t1 | test.swift:356:15:356:15 | t1 |
282+
| test.swift:356:15:356:15 | [post] t1 | test.swift:357:15:357:15 | t1 |
283+
| test.swift:356:15:356:15 | t1 | test.swift:357:15:357:15 | t1 |
284+
| test.swift:357:15:357:15 | [post] t1 | test.swift:358:15:358:15 | t1 |
285+
| test.swift:357:15:357:15 | t1 | test.swift:358:15:358:15 | t1 |
286+
| test.swift:359:15:359:15 | t2 | test.swift:360:15:360:15 | t2 |
287+
| test.swift:360:15:360:15 | [post] t2 | test.swift:361:15:361:15 | t2 |
288+
| test.swift:360:15:360:15 | t2 | test.swift:361:15:361:15 | t2 |
289+
| test.swift:361:15:361:15 | [post] t2 | test.swift:362:15:362:15 | t2 |
290+
| test.swift:361:15:361:15 | t2 | test.swift:362:15:362:15 | t2 |

swift/ql/test/library-tests/dataflow/dataflow/test.swift

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,35 @@ func test_optionals(y: Int?) {
295295
}
296296
}
297297

298+
299+
300+
301+
302+
303+
304+
305+
306+
307+
308+
309+
310+
311+
312+
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
298327
func sink(arg: (Int, Int)) {}
299328
func sink(arg: (Int, Int, Int)) {}
300329

@@ -303,7 +332,7 @@ func testTuples() {
303332

304333
sink(arg: t1)
305334
sink(arg: t1.0)
306-
sink(arg: t1.1) // $ flow=302
335+
sink(arg: t1.1) // $ flow=331
307336

308337
t1.1 = 2
309338

@@ -314,7 +343,7 @@ func testTuples() {
314343
t1.0 = source()
315344

316345
sink(arg: t1)
317-
sink(arg: t1.0) // $ flow=314
346+
sink(arg: t1.0) // $ flow=343
318347
sink(arg: t1.1)
319348
}
320349

@@ -324,14 +353,14 @@ func testTuples2() {
324353
let (a, b, c) = t1
325354

326355
sink(arg: t1)
327-
sink(arg: t1.x) // $ flow=322
328-
sink(arg: t1.y) // $ flow=322
356+
sink(arg: t1.x) // $ flow=351
357+
sink(arg: t1.y) // $ flow=351
329358
sink(arg: t1.z)
330359
sink(arg: t2)
331-
sink(arg: t2.x) // $ flow=322
332-
sink(arg: t2.y) // $ flow=322
360+
sink(arg: t2.x) // $ flow=351
361+
sink(arg: t2.y) // $ flow=351
333362
sink(arg: t2.z)
334-
sink(arg: a) // $ MISSING: flow=322
335-
sink(arg: b) // $ MISSING: flow=322
363+
sink(arg: a) // $ MISSING: flow=351
364+
sink(arg: b) // $ MISSING: flow=351
336365
sink(arg: c)
337366
}

0 commit comments

Comments
 (0)