Swift: expand tests

This commit is contained in:
Paolo Tranquilli
2022-08-19 16:15:17 +02:00
parent f0ec43b04c
commit 631d234026
8 changed files with 43 additions and 21 deletions

View File

@@ -1 +1,3 @@
| 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 |
| 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 |
| 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 |
| 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 |

View File

@@ -1 +1,3 @@
| dot_syntax_call.swift:9:9:9:11 | call to ... | 0 | dot_syntax_call.swift:9:9:9:9 | : X.Type |
| dot_syntax_call.swift:7:13:7:13 | call to ... | 0 | dot_syntax_call.swift:7:13:7:13 | : self |
| dot_syntax_call.swift:15:9:15:11 | call to ... | 0 | dot_syntax_call.swift:15:9:15:9 | : X.Type |
| dot_syntax_call.swift:16:9:16:13 | call to ... | 0 | dot_syntax_call.swift:16:9:16:11 | : call to init |

View File

@@ -1 +1,3 @@
| dot_syntax_call.swift:9:9:9:11 | call to ... | () -> () |
| dot_syntax_call.swift:7:13:7:13 | call to ... | (Int) -> () |
| dot_syntax_call.swift:15:9:15:11 | call to ... | () -> () |
| dot_syntax_call.swift:16:9:16:13 | call to ... | (Int) -> () |

View File

@@ -1,9 +1,16 @@
class X {
static func foo(_: Int, _:Int) {}
class func bar() {}
func baz(_: Int) {}
init() {
let f = baz
}
}
X.foo(1, 2)
X.bar()
X().baz(42)
let f = X.bar
let g = X().baz

View File

@@ -1,4 +1,6 @@
| method_refs.swift:5:13:5:13 | .bar(_:) | getBase: | file://:0:0:0:0 | self |
| method_refs.swift:6:5:6:5 | .bar(_:) | getBase: | method_refs.swift:6:5:6:5 | self |
| method_refs.swift:11:1:11:3 | .bar(_:) | getBase: | method_refs.swift:11:1:11:1 | x |
| method_refs.swift:13:11:13:11 | .bar(_:) | getBase: | file://:0:0:0:0 | self |
| method_refs.swift:7:13:7:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self |
| method_refs.swift:11:1:11:3 | .foo(_:_:) | getBase: | method_refs.swift:11:1:11:1 | X.Type |
| method_refs.swift:12:1:12:3 | .bar() | getBase: | method_refs.swift:12:1:12:1 | X.Type |
| method_refs.swift:13:1:13:5 | .baz(_:) | getBase: | method_refs.swift:13:1:13:3 | call to init |
| method_refs.swift:15:11:15:11 | .bar() | getBase: | file://:0:0:0:0 | self |
| method_refs.swift:16:13:16:13 | .baz(_:) | getBase: | file://:0:0:0:0 | self |

View File

@@ -1,4 +1,6 @@
| method_refs.swift:5:13:5:13 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
| method_refs.swift:6:5:6:5 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
| method_refs.swift:11:1:11:3 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
| method_refs.swift:13:11:13:11 | .bar(_:) | method_refs.swift:2:3:2:21 | bar(_:) |
| method_refs.swift:7:13:7:13 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |
| method_refs.swift:11:1:11:3 | .foo(_:_:) | method_refs.swift:2:3:2:35 | foo(_:_:) |
| method_refs.swift:12:1:12:3 | .bar() | method_refs.swift:3:3:3:21 | bar() |
| method_refs.swift:13:1:13:5 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |
| method_refs.swift:15:11:15:11 | .bar() | method_refs.swift:3:3:3:21 | bar() |
| method_refs.swift:16:13:16:13 | .baz(_:) | method_refs.swift:4:3:4:21 | baz(_:) |

View File

@@ -1,4 +1,6 @@
| method_refs.swift:5:13:5:13 | .bar(_:) | (Int) -> () |
| method_refs.swift:6:5:6:5 | .bar(_:) | (Int) -> () |
| method_refs.swift:11:1:11:3 | .bar(_:) | (Int) -> () |
| method_refs.swift:13:11:13:11 | .bar(_:) | (Int) -> () |
| method_refs.swift:7:13:7:13 | .baz(_:) | (Int) -> () |
| method_refs.swift:11:1:11:3 | .foo(_:_:) | (Int, Int) -> () |
| method_refs.swift:12:1:12:3 | .bar() | () -> () |
| method_refs.swift:13:1:13:5 | .baz(_:) | (Int) -> () |
| method_refs.swift:15:11:15:11 | .bar() | () -> () |
| method_refs.swift:16:13:16:13 | .baz(_:) | (Int) -> () |

View File

@@ -1,13 +1,16 @@
class X {
func bar(_: Int) {}
static func foo(_: Int, _:Int) {}
class func bar() {}
func baz(_: Int) {}
init() {
let f = bar
bar(0)
let f = baz
}
}
let x = X()
x.bar(42)
X.foo(1, 2)
X.bar()
X().baz(42)
let f = x.bar
let f = X.bar
let g = X().baz