Skip to content

Commit 631d234

Browse files
committed
Swift: expand tests
1 parent f0ec43b commit 631d234

File tree

8 files changed

+43
-21
lines changed

8 files changed

+43
-21
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
| dot_syntax_call.swift:9:9:9:11 | call to ... | getFunction: | dot_syntax_call.swift:9:11:9:11 | { ... } | getBase: | dot_syntax_call.swift:9:9:9:9 | X.Type |
1+
| dot_syntax_call.swift:7:13:7:13 | call to ... | getFunction: | dot_syntax_call.swift:7:13:7:13 | { ... } | getBase: | dot_syntax_call.swift:7:13:7:13 | self |
2+
| dot_syntax_call.swift:15:9:15:11 | call to ... | getFunction: | dot_syntax_call.swift:15:11:15:11 | { ... } | getBase: | dot_syntax_call.swift:15:9:15:9 | X.Type |
3+
| dot_syntax_call.swift:16:9:16:13 | call to ... | getFunction: | dot_syntax_call.swift:16:13:16:13 | { ... } | getBase: | dot_syntax_call.swift:16:9:16:11 | call to init |
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
| dot_syntax_call.swift:9:9:9:11 | call to ... | 0 | dot_syntax_call.swift:9:9:9:9 | : X.Type |
1+
| dot_syntax_call.swift:7:13:7:13 | call to ... | 0 | dot_syntax_call.swift:7:13:7:13 | : self |
2+
| dot_syntax_call.swift:15:9:15:11 | call to ... | 0 | dot_syntax_call.swift:15:9:15:9 | : X.Type |
3+
| dot_syntax_call.swift:16:9:16:13 | call to ... | 0 | dot_syntax_call.swift:16:9:16:11 | : call to init |
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
| dot_syntax_call.swift:9:9:9:11 | call to ... | () -> () |
1+
| dot_syntax_call.swift:7:13:7:13 | call to ... | (Int) -> () |
2+
| dot_syntax_call.swift:15:9:15:11 | call to ... | () -> () |
3+
| dot_syntax_call.swift:16:9:16:13 | call to ... | (Int) -> () |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
class X {
22
static func foo(_: Int, _:Int) {}
33
class func bar() {}
4+
func baz(_: Int) {}
5+
6+
init() {
7+
let f = baz
8+
}
49
}
510

611
X.foo(1, 2)
712
X.bar()
13+
X().baz(42)
814

915
let f = X.bar
16+
let g = X().baz
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
| method_refs.swift:5:13:5:13 | .bar(_:) | getBase: | file://:0:0:0:0 | self |
2-
| method_refs.swift:6:5:6:5 | .bar(_:) | getBase: | method_refs.swift:6:5:6:5 | self |
3-
| method_refs.swift:11:1:11:3 | .bar(_:) | getBase: | method_refs.swift:11:1:11:1 | x |
4-
| method_refs.swift:13:11:13:11 | .bar(_:) | getBase: | file://:0:0:0:0 | self |
1+
| method_refs.swift:7:13:7:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self |
2+
| method_refs.swift:11:1:11:3 | .foo(_:_:) | getBase: | method_refs.swift:11:1:11:1 | X.Type |
3+
| method_refs.swift:12:1:12:3 | .bar() | getBase: | method_refs.swift:12:1:12:1 | X.Type |
4+
| method_refs.swift:13:1:13:5 | .baz(_:) | getBase: | method_refs.swift:13:1:13:3 | call to init |
5+
| method_refs.swift:15:11:15:11 | .bar() | getBase: | file://:0:0:0:0 | self |
6+
| method_refs.swift:16:13:16:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self |
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
| method_refs.swift:5:13:5:13 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
2-
| method_refs.swift:6:5:6:5 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
3-
| method_refs.swift:11:1:11:3 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
4-
| method_refs.swift:13:11:13:11 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
1+
| method_refs.swift:7:13:7:13 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |
2+
| method_refs.swift:11:1:11:3 | .foo(_:_:) | method_refs.swift:2:3:2:35 | foo(_:_:) |
3+
| method_refs.swift:12:1:12:3 | .bar() | method_refs.swift:3:3:3:21 | bar() |
4+
| method_refs.swift:13:1:13:5 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |
5+
| method_refs.swift:15:11:15:11 | .bar() | method_refs.swift:3:3:3:21 | bar() |
6+
| method_refs.swift:16:13:16:13 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
| method_refs.swift:5:13:5:13 | .bar(_:) | (Int) -> () |
2-
| method_refs.swift:6:5:6:5 | .bar(_:) | (Int) -> () |
3-
| method_refs.swift:11:1:11:3 | .bar(_:) | (Int) -> () |
4-
| method_refs.swift:13:11:13:11 | .bar(_:) | (Int) -> () |
1+
| method_refs.swift:7:13:7:13 | .baz(_:) | (Int) -> () |
2+
| method_refs.swift:11:1:11:3 | .foo(_:_:) | (Int, Int) -> () |
3+
| method_refs.swift:12:1:12:3 | .bar() | () -> () |
4+
| method_refs.swift:13:1:13:5 | .baz(_:) | (Int) -> () |
5+
| method_refs.swift:15:11:15:11 | .bar() | () -> () |
6+
| method_refs.swift:16:13:16:13 | .baz(_:) | (Int) -> () |
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
class X {
2-
func bar(_: Int) {}
2+
static func foo(_: Int, _:Int) {}
3+
class func bar() {}
4+
func baz(_: Int) {}
35

46
init() {
5-
let f = bar
6-
bar(0)
7+
let f = baz
78
}
89
}
910

10-
let x = X()
11-
x.bar(42)
11+
X.foo(1, 2)
12+
X.bar()
13+
X().baz(42)
1214

13-
let f = x.bar
15+
let f = X.bar
16+
let g = X().baz

0 commit comments

Comments
 (0)