Skip to content

Commit 310ebe4

Browse files
committed
Swift: Clean up test file.
1 parent 9dbf7e8 commit 310ebe4

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

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

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func foo() -> Int {
7575
let r = { x }
7676
sink(r()) // $ MISSING: hasValueFlow=foo
7777
f(1)
78-
return r() // $ MISSING: hasTaintFlow=foo
78+
return r()
7979
}
8080

8181
func bar() -> () -> Int {
@@ -151,35 +151,3 @@ func simplestTest() {
151151
let x = source("simplestTest", 0)
152152
sink(x) // $ hasValueFlow=simplestTest
153153
}
154-
155-
func main() {
156-
print("captureList():")
157-
captureList() // Hello world! 123
158-
159-
print("callEscape():")
160-
callEscape() // 1
161-
162-
print("logical():", logical()) // true
163-
164-
print("asyncTest():")
165-
asyncTest() // 42
166-
167-
print("foo():", foo()) // 42
168-
169-
let a = bar()
170-
let b = baz()
171-
172-
print("bar():", a(), a()) // $ MISSING: hasTaintFlow=bar
173-
174-
print("baz():", b(), b()) // $ MISSING: hasTaintFlow=baz
175-
176-
g!(1)
177-
print("g!(1):", b(), b()) // $ MISSING: hasTaintFlow=baz
178-
179-
print("sharedCapture():", sharedCapture()) // 4
180-
181-
print("sharedCaptureMultipleWriters():")
182-
sharedCaptureMultipleWriters() // 42, -1
183-
}
184-
185-
main()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
failures
21
testFailures
2+
failures

0 commit comments

Comments
 (0)