Skip to content

Commit 2f0ee12

Browse files
committed
Swift: fix patterns/bound_and_unbound.ql test
1 parent f22d60f commit 2f0ee12

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

swift/ql/test/extractor-tests/patterns/bound_and_unbound.expected

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
bound
21
| patterns.swift:2:9:2:9 | an_int |
32
| patterns.swift:3:9:3:9 | a_string |
43
| patterns.swift:4:10:4:10 | x |
@@ -19,8 +18,10 @@ bound
1918
| patterns.swift:55:16:55:16 | b |
2019
| patterns.swift:55:23:55:23 | c |
2120
| patterns.swift:57:13:57:13 | a |
21+
| patterns.swift:57:16:57:16 | b |
2222
| patterns.swift:57:19:57:19 | c |
2323
| patterns.swift:58:21:58:21 | b |
24+
| patterns.swift:58:28:58:28 | c |
2425
| patterns.swift:62:18:62:18 | c |
2526
| patterns.swift:78:9:78:9 | a |
2627
| patterns.swift:83:24:83:24 | a |
@@ -61,6 +62,3 @@ bound
6162
| patterns.swift:174:38:174:38 | c |
6263
| patterns.swift:174:49:174:49 | d |
6364
| patterns.swift:174:52:174:52 | e |
64-
unbound
65-
| patterns.swift:57:16:57:16 | b |
66-
| patterns.swift:58:28:58:28 | c |
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import swift
22

3-
query predicate bound(NamedPattern p) {
4-
p.getFile().getBaseName() = "patterns.swift" and
5-
p.hasVarDecl()
6-
}
7-
8-
query predicate unbound(NamedPattern p) {
9-
p.getFile().getBaseName() = "patterns.swift" and
10-
not p.hasVarDecl()
11-
}
3+
from NamedPattern p
4+
where p.getFile().getBaseName() = "patterns.swift"
5+
select p

0 commit comments

Comments
 (0)