Skip to content

Commit 81a25b2

Browse files
committed
Swift: fix tests for array concatenation
1 parent d4b635d commit 81a25b2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,8 @@
718718
| test.swift:650:9:650:9 | arr4 | test.swift:650:9:650:9 | SSA def(arr4) |
719719
| test.swift:650:16:650:23 | ... .+(_:_:) ... | test.swift:650:9:650:9 | arr4 |
720720
| test.swift:650:23:650:23 | arr3 | test.swift:651:15:651:15 | arr3 |
721+
| test.swift:651:15:651:15 | arr3 | test.swift:651:15:651:15 | &... |
722+
| test.swift:652:15:652:15 | arr4 | test.swift:652:15:652:15 | &... |
721723
| test.swift:654:9:654:9 | SSA def(arr5) | test.swift:655:15:655:15 | arr5 |
722724
| test.swift:654:9:654:9 | arr5 | test.swift:654:9:654:9 | SSA def(arr5) |
723725
| test.swift:654:16:654:51 | call to Array<Element>.init(repeating:count:) | test.swift:654:9:654:9 | arr5 |

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,8 @@ func testArray() {
648648

649649
var arr3 = [1]
650650
var arr4 = arr2 + arr3
651-
sink(arg: arr3)
652-
sink(arg: arr4) // $ MISSING: flow=642
651+
sink(arg: arr3[0])
652+
sink(arg: arr4[0]) // $ MISSING: flow=642
653653

654654
var arr5 = Array(repeating: source(), count: 2)
655655
sink(arg: arr5[0]) // $ MISSING: flow=654

0 commit comments

Comments
 (0)