Skip to content

Commit 08927e9

Browse files
committed
[test] Convert complete_unqualified_lookup.swift to %batch-code-completion
1 parent e98186b commit 08927e9

File tree

1 file changed

+29
-58
lines changed

1 file changed

+29
-58
lines changed
Lines changed: 29 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,4 @@
1-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_VAR_INIT | %FileCheck %s -check-prefix=STRUCT_STATIC
2-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_VAR_INIT | %FileCheck %s -check-prefix=STRUCT_STATIC
3-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_LAZY_VAR_INIT | %FileCheck %s -check-prefix=STRUCT_INSTANCE
4-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_VAR_BODY | %FileCheck %s -check-prefix=STRUCT_INSTANCE
5-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_VAR_BODY | %FileCheck %s -check-prefix=STRUCT_STATIC
6-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INITIALIZER_DEFAULTPARAM | %FileCheck %s -check-prefix=STRUCT_STATIC
7-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INITIALIZER_BODY | %FileCheck %s -check-prefix=STRUCT_INSTANCE
8-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_FUNC_DEFAULTPARAM | %FileCheck %s -check-prefix=STRUCT_STATIC
9-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_FUNC_BODY | %FileCheck %s -check-prefix=STRUCT_INSTANCE
10-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_FUNC_DEFAULTPARAM | %FileCheck %s -check-prefix=STRUCT_STATIC
11-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_FUNC_BODY | %FileCheck %s -check-prefix=STRUCT_STATIC
12-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_SUBSCRIPT_DEFAULTPARAM | %FileCheck %s -check-prefix=STRUCT_STATIC
13-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE_SUBSCRIPT_BODY | %FileCheck %s -check-prefix=STRUCT_INSTANCE
14-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_SUBSCRIPT_DEFAULTPARAM | %FileCheck %s -check-prefix=STRUCT_STATIC
15-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_STATIC_SUBSCRIPT_BODY | %FileCheck %s -check-prefix=STRUCT_STATIC
16-
17-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_VAR_INIT | %FileCheck %s -check-prefix=ENUM_STATIC
18-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INSTANCE_VAR_BODY | %FileCheck %s -check-prefix=ENUM_INSTANCE
19-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_VAR_BODY | %FileCheck %s -check-prefix=ENUM_STATIC
20-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INITIALIZER_DEFAULTPARAM | %FileCheck %s -check-prefix=ENUM_STATIC
21-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INITIALIZER_BODY | %FileCheck %s -check-prefix=ENUM_INSTANCE
22-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INSTANCE_FUNC_DEFAULTPARAM | %FileCheck %s -check-prefix=ENUM_STATIC
23-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INSTANCE_FUNC_BODY | %FileCheck %s -check-prefix=ENUM_INSTANCE
24-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_FUNC_DEFAULTPARAM | %FileCheck %s -check-prefix=ENUM_STATIC
25-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_FUNC_BODY | %FileCheck %s -check-prefix=ENUM_STATIC
26-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INSTANCE_SUBSCRIPT_DEFAULTPARAM | %FileCheck %s -check-prefix=ENUM_STATIC
27-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_INSTANCE_SUBSCRIPT_BODY | %FileCheck %s -check-prefix=ENUM_INSTANCE
28-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_SUBSCRIPT_DEFAULTPARAM | %FileCheck %s -check-prefix=ENUM_STATIC
29-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_STATIC_SUBSCRIPT_BODY | %FileCheck %s -check-prefix=ENUM_STATIC
30-
1+
// RUN: %batch-code-completion
312

323
// STRUCT_INSTANCE-NOT: init()
334
// STRUCT_INSTANCE-NOT: staticVar
@@ -53,29 +24,29 @@ struct MyStruct {
5324
var instanceVar: Int { 1 }
5425
func instanceFunc() -> Int { 1 }
5526

56-
var testInstanceVarInit: String = (#^STRUCT_INSTANCE_VAR_INIT^#)
57-
static var testStaticVarInit: String = (#^STRUCT_STATIC_VAR_INIT^#)
58-
lazy var testLazyVarInit: String = (#^STRUCT_LAZY_VAR_INIT^#)
27+
var testInstanceVarInit: String = (#^STRUCT_INSTANCE_VAR_INIT?check=STRUCT_STATIC^#)
28+
static var testStaticVarInit: String = (#^STRUCT_STATIC_VAR_INIT?check=STRUCT_STATIC^#)
29+
lazy var testLazyVarInit: String = (#^STRUCT_LAZY_VAR_INIT?check=STRUCT_INSTANCE^#)
5930
var testInstanceVar: String {
60-
#^STRUCT_INSTANCE_VAR_BODY^#
31+
#^STRUCT_INSTANCE_VAR_BODY?check=STRUCT_INSTANCE^#
6132
}
6233
static var testStaticVar: String {
63-
#^STRUCT_STATIC_VAR_BODY^#
34+
#^STRUCT_STATIC_VAR_BODY?check=STRUCT_STATIC^#
6435
}
65-
init(testInit: String = #^STRUCT_INITIALIZER_DEFAULTPARAM^#) {
66-
#^STRUCT_INITIALIZER_BODY^#
36+
init(testInit: String = #^STRUCT_INITIALIZER_DEFAULTPARAM?check=STRUCT_STATIC^#) {
37+
#^STRUCT_INITIALIZER_BODY?check=STRUCT_INSTANCE^#
6738
}
68-
func testInstanceMethod(x: String = #^STRUCT_INSTANCE_FUNC_DEFAULTPARAM^#) {
69-
#^STRUCT_INSTANCE_FUNC_BODY^#
39+
func testInstanceMethod(x: String = #^STRUCT_INSTANCE_FUNC_DEFAULTPARAM?check=STRUCT_STATIC^#) {
40+
#^STRUCT_INSTANCE_FUNC_BODY?check=STRUCT_INSTANCE^#
7041
}
71-
static func testStaticMethod(x: String = #^STRUCT_STATIC_FUNC_DEFAULTPARAM^#) {
72-
#^STRUCT_STATIC_FUNC_BODY^#
42+
static func testStaticMethod(x: String = #^STRUCT_STATIC_FUNC_DEFAULTPARAM?check=STRUCT_STATIC^#) {
43+
#^STRUCT_STATIC_FUNC_BODY?check=STRUCT_STATIC^#
7344
}
74-
subscript(testInstanceSubscript idx: String = #^STRUCT_INSTANCE_SUBSCRIPT_DEFAULTPARAM^#) {
75-
#^STRUCT_INSTANCE_SUBSCRIPT_BODY^#
45+
subscript(testInstanceSubscript idx: String = #^STRUCT_INSTANCE_SUBSCRIPT_DEFAULTPARAM?check=STRUCT_STATIC^#) {
46+
#^STRUCT_INSTANCE_SUBSCRIPT_BODY?check=STRUCT_INSTANCE^#
7647
}
77-
static subscript(testStaticSubscript idx: String = #^STRUCT_STATIC_SUBSCRIPT_DEFAULTPARAM^#) {
78-
#^STRUCT_STATIC_SUBSCRIPT_BODY^#
48+
static subscript(testStaticSubscript idx: String = #^STRUCT_STATIC_SUBSCRIPT_DEFAULTPARAM?check=STRUCT_STATIC^#) {
49+
#^STRUCT_STATIC_SUBSCRIPT_BODY?check=STRUCT_STATIC^#
7950
}
8051
}
8152

@@ -110,26 +81,26 @@ enum MyEnum {
11081
var instanceVar: Int { 1 }
11182
func instanceFunc() -> Int { 1 }
11283

113-
static var testStaticVarInit: String = (#^ENUM_STATIC_VAR_INIT^#)
84+
static var testStaticVarInit: String = (#^ENUM_STATIC_VAR_INIT?check=ENUM_STATIC^#)
11485
var testInstanceVar: String {
115-
#^ENUM_INSTANCE_VAR_BODY^#
86+
#^ENUM_INSTANCE_VAR_BODY?check=ENUM_INSTANCE^#
11687
}
11788
static var testStaticVar: String {
118-
#^ENUM_STATIC_VAR_BODY^#
89+
#^ENUM_STATIC_VAR_BODY?check=ENUM_STATIC^#
11990
}
120-
func init(testInit: String = #^ENUM_INITIALIZER_DEFAULTPARAM^#) {
121-
#^ENUM_INITIALIZER_BODY^#
91+
init(testInit: String = #^ENUM_INITIALIZER_DEFAULTPARAM?check=ENUM_STATIC^#) {
92+
#^ENUM_INITIALIZER_BODY?check=ENUM_INSTANCE^#
12293
}
123-
func testInstanceMethod(x: String = #^ENUM_INSTANCE_FUNC_DEFAULTPARAM^#) {
124-
#^ENUM_INSTANCE_FUNC_BODY^#
94+
func testInstanceMethod(x: String = #^ENUM_INSTANCE_FUNC_DEFAULTPARAM?check=ENUM_STATIC^#) {
95+
#^ENUM_INSTANCE_FUNC_BODY?check=ENUM_INSTANCE^#
12596
}
126-
static func testStaticMethod(x: String = #^ENUM_STATIC_FUNC_DEFAULTPARAM^#) {
127-
#^ENUM_STATIC_FUNC_BODY^#
97+
static func testStaticMethod(x: String = #^ENUM_STATIC_FUNC_DEFAULTPARAM?check=ENUM_STATIC^#) {
98+
#^ENUM_STATIC_FUNC_BODY?check=ENUM_STATIC^#
12899
}
129-
subscript(testInstanceSubscript idx: String = #^ENUM_INSTANCE_SUBSCRIPT_DEFAULTPARAM^#) {
130-
#^ENUM_INSTANCE_SUBSCRIPT_BODY^#
100+
subscript(testInstanceSubscript idx: String = #^ENUM_INSTANCE_SUBSCRIPT_DEFAULTPARAM?check=ENUM_STATIC^#) {
101+
#^ENUM_INSTANCE_SUBSCRIPT_BODY?check=ENUM_INSTANCE^#
131102
}
132-
static subscript(testStaticSubscript idx: String = #^ENUM_STATIC_SUBSCRIPT_DEFAULTPARAM^#) {
133-
#^ENUM_STATIC_SUBSCRIPT_BODY^#
103+
static subscript(testStaticSubscript idx: String = #^ENUM_STATIC_SUBSCRIPT_DEFAULTPARAM?check=ENUM_STATIC^#) {
104+
#^ENUM_STATIC_SUBSCRIPT_BODY?check=ENUM_STATIC^#
134105
}
135106
}

0 commit comments

Comments
 (0)