Skip to content

Commit 8c1f391

Browse files
committed
Gardening: Migrate test suite to GH issues: IDE
1 parent 04f1cde commit 8c1f391

22 files changed

+94
-63
lines changed

test/IDE/coloring_class_restriction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s
33

44
// NOTE: Testing 'class' at the end of the file. Don't add anything after that.
5-
// https://bugs.swift.org/browse/SR-8378
5+
// https://github.com/apple/swift/issues/50905
66

77
// CHECK: <kw>protocol</kw> P : <type>class</type>
88
protocol P : class

test/IDE/complete_call_arg.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -930,11 +930,13 @@ func testCompleteLabelAfterVararg() {
930930
// COMPLETE_MEMBER_IN_VARARG: End completions
931931
}
932932

933-
struct Sr14515 {
933+
// https://github.com/apple/swift/issues/56867
934+
935+
struct S_56867 {
934936
func test(_: Foo..., yArg: Baz) {}
935937
}
936938

937-
private func testSr14515(value: Sr14515, foo: Foo, baz: Baz) {
939+
private func test_56867(value: S_56867, foo: Foo, baz: Baz) {
938940
value.test(foo, #^COMPLETE_VARARG_FOLLOWED_BY_NORMAL_ARG^#)
939941
// COMPLETE_VARARG_FOLLOWED_BY_NORMAL_ARG: Begin completions
940942
// COMPLETE_VARARG_FOLLOWED_BY_NORMAL_ARG-DAG: Decl[LocalVar]/Local/TypeRelation[Convertible]: foo[#Foo#];
@@ -995,15 +997,17 @@ struct Rdar77867723 {
995997
}
996998
}
997999

998-
struct SR14737<T> {
1000+
// https://github.com/apple/swift/issues/57087
1001+
1002+
struct S_57087<T> {
9991003
init(arg1: T, arg2: Bool) {}
10001004
}
1001-
extension SR14737 where T == Int {
1005+
extension S_57087 where T == Int {
10021006
init(arg1: T, onlyInt: Bool) {}
10031007
}
1004-
func test_SR14737() {
1008+
do {
10051009
invalidCallee {
1006-
SR14737(arg1: true, #^GENERIC_INIT_IN_INVALID^#)
1010+
S_57087(arg1: true, #^GENERIC_INIT_IN_INVALID^#)
10071011
// GENERIC_INIT_IN_INVALID: Begin completions, 1 item
10081012
// GENERIC_INIT_IN_INVALID-DAG: Pattern/Local/Flair[ArgLabels]: {#arg2: Bool#}[#Bool#];
10091013
// GENERIC_INIT_IN_INVALID: End completions

test/IDE/complete_constrained.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ func foo(s: MyStruct<Int>) {
8888
// META_MYSTRUCT_INT_DOT: End completions
8989
}
9090

91-
//https://bugs.swift.org/browse/SR-9938
91+
// https://github.com/apple/swift/issues/52344
92+
9293
enum Fruit { case apple }
9394
enum Vegetable { case broccoli }
9495
enum Meat { case chicken }

test/IDE/complete_generic_optional.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ struct Foo<T> {
88
}
99
}
1010

11-
// SR-642 Code completion does not instantiate generic arguments of a type wrapped in an optional
11+
// https://github.com/apple/swift/issues/43259
12+
// Code completion does not instantiate generic arguments of a type wrapped
13+
// in an optional
1214
let x: Foo<Bar>? = Foo<Bar>()
1315
x.#^FOO_OPTIONAL_1^#
1416
// FOO_OPTIONAL_1: Begin completions, 7 items

test/IDE/complete_generic_param.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,30 @@ class C3 {
3939
// INHERIT-NOT: ValueString2
4040
// INHERIT-NOT: TopLevelFunc
4141

42+
// https://github.com/apple/swift/issues/56788
4243

43-
class Sr14432<T, U> {}
44+
class C4<T, U> {}
4445

45-
_ = Sr14432<#^GENERIC_TYPE_PARAM^# >()
46-
_ = Sr14432<SomeType, #^SECOND_GENERIC_TYPE_PARAM^# >()
46+
_ = C4<#^GENERIC_TYPE_PARAM^# >()
47+
_ = C4<SomeType, #^SECOND_GENERIC_TYPE_PARAM^# >()
4748
// GENERIC_TYPE_PARAM: Begin completions
4849
// GENERIC_TYPE_PARAM-DAG: Decl[Class]/CurrModule: C1[#C1#];
4950
// GENERIC_TYPE_PARAM: End completions
5051

51-
struct Sr14627 {
52+
// https://github.com/apple/swift/issues/56979
53+
54+
struct S2 {
5255
struct Nested<Elements> {
53-
init() { fatalError() }
56+
init() {}
5457
}
5558
}
5659

57-
var sr14627_globalVar = Sr14627.Nested< #^GENERIC_PARAM_ON_NESTED_TYPE_GLOBAL_VAR^#>()
60+
var s2_globalVar = S2.Nested< #^GENERIC_PARAM_ON_NESTED_TYPE_GLOBAL_VAR^#>()
5861

5962
func someFunction() {
60-
var sr14627_localVar = Sr14627.Nested< #^GENERIC_PARAM_ON_NESTED_TYPE_LOCAL_VAR^#>()
63+
var s2_localVar = S2.Nested< #^GENERIC_PARAM_ON_NESTED_TYPE_LOCAL_VAR^#>()
6164
}
6265

6366
// GENERIC_PARAM_ON_NESTED_TYPE: Begin completions
64-
// GENERIC_PARAM_ON_NESTED_TYPE-DAG: Decl[Struct]/CurrModule: Sr14627[#Sr14627#];
67+
// GENERIC_PARAM_ON_NESTED_TYPE-DAG: Decl[Struct]/CurrModule: S2[#S2#];
6568
// GENERIC_PARAM_ON_NESTED_TYPE: End completions

test/IDE/complete_import_overloads.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99

1010
import library
1111

12+
// https://github.com/apple/swift/issues/49889
1213
// Ensure we maintain compatibility with Swift 4's overload signature rules.
1314
// Variables defined in extensions of generic types had different overload
14-
// signatures to other variables, so allow overloading in such cases (SR-7341).
15+
// signatures to other variables, so allow overloading in such cases.
1516
extension HasFooGeneric {
1617
var foo: String { return "" } // foo isn't defined in a generic extension in the other module, so allow overloading in Swift 4 mode.
1718
var bar: String { return "" } // bar is defined in a generic extension in the other module, so `bar: String` always shadows it.

test/IDE/complete_member_decls_from_parent_decl_context.swift

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_E_1 | %FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_E_1
3333

34-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SR627_SUBCLASS | %FileCheck %s -check-prefix=SR627_SUBCLASS
35-
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SR627_SUB_SUBCLASS | %FileCheck %s -check-prefix=SR627_SUB_SUBCLASS
34+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ISSUE_43244_SUBCLASS | %FileCheck %s -check-prefix=ISSUE_43244_SUBCLASS
35+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ISSUE_43244_SUB_SUBCLASS | %FileCheck %s -check-prefix=ISSUE_43244_SUB_SUBCLASS
3636

3737
//===---
3838
//===--- Test that we can code complete in methods, and correctly distinguish
@@ -598,22 +598,23 @@ func testOuterE() {
598598
// NESTED_NOMINAL_DECL_E_1-NOT: dFunc6()
599599
// NESTED_NOMINAL_DECL_E_1: End completions
600600

601-
class SR627_BaseClass<T> {
602-
func myFunction(_ x: T) -> T? {
603-
return nil
601+
// https://github.com/apple/swift/issues/43244
602+
do {
603+
class BaseClass<T> {
604+
func myFunction(_ x: T) -> T? {}
604605
}
605-
}
606606

607-
class SR627_Subclass: SR627_BaseClass<String> {
608-
#^SR627_SUBCLASS^#
609-
// SR627_SUBCLASS: Begin completions
610-
// SR627_SUBCLASS-DAG: Decl[InstanceMethod]/Super: override func myFunction(_ x: String) -> String? {|}; name=myFunction(:)
611-
// SR627_SUBCLASS: End completions
612-
}
607+
class Subclass: BaseClass<String> {
608+
#^ISSUE_43244_SUBCLASS^#
609+
// ISSUE_43244_SUBCLASS: Begin completions
610+
// ISSUE_43244_SUBCLASS-DAG: Decl[InstanceMethod]/Super: override func myFunction(_ x: String) -> String? {|}; name=myFunction(:)
611+
// ISSUE_43244_SUBCLASS: End completions
612+
}
613613

614-
class SR627_SubSubclass: SR627_Subclass {
615-
#^SR627_SUB_SUBCLASS^#
616-
// SR627_SUB_SUBCLASS: Begin completions
617-
// SR627_SUB_SUBCLASS-DAG: Decl[InstanceMethod]/Super: override func myFunction(_ x: String) -> String? {|}; name=myFunction(:)
618-
// SR627_SUB_SUBCLASS: End completions
614+
class SubSubclass: Subclass {
615+
#^ISSUE_43244_SUB_SUBCLASS^#
616+
// ISSUE_43244_SUB_SUBCLASS: Begin completions
617+
// ISSUE_43244_SUB_SUBCLASS-DAG: Decl[InstanceMethod]/Super: override func myFunction(_ x: String) -> String? {|}; name=myFunction(:)
618+
// ISSUE_43244_SUB_SUBCLASS: End completions
619+
}
619620
}

test/IDE/complete_multiple_files.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ func moduleScoped() {
5050
// MODULE_SCOPED-NOT: ERROR
5151
// MODULE_SCOPED: End completions
5252

53+
// https://github.com/apple/swift/issues/57800
54+
5355
enum Foo {
5456
case bar
5557
}
5658

57-
var sr15495: Void = {
59+
var _: Void = {
5860
let foo: Foo = .#^VAR_INITIALIZED_BY_CALLING_CLOSURE^#
5961
}()
6062

test/IDE/complete_multiple_trailingclosure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func testFallbackPostfix() {
205205
// doesn't match the already-provided parameters (missing `name` label argument
206206
// and closure does not return `String`). However, we are not type-checking at
207207
// the stage at which we complete argument labels, so we can't rule it out for
208-
// now (SR-14450).
208+
// now. (https://github.com/apple/swift/issues/56806)
209209
// INIT_FALLBACK_1: Begin completions, 3 items
210210
// INIT_FALLBACK_1-DAG: Pattern/Local/Flair[ArgLabels]: {#arg3: () -> _ {|}#}[#() -> _#]
211211
// INIT_FALLBACK_1-DAG: Decl[InstanceMethod]/CurrNominal: .testStructMethod()[#Void#];

test/IDE/complete_override.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,16 +387,18 @@ class OmitKW10: ProtocolA {
387387
// WITH_PA
388388
}
389389

390-
protocol SR2560Proto {
390+
// https://github.com/apple/swift/issues/45165
391+
392+
protocol P_45165 {
391393
func foo<S : Sequence>(x: S) where S.Iterator.Element == Int
392394
}
393-
class SR2560Class: SR2560Proto {
394-
#^SR2560_WHERE_CLAUSE?keywords=false^#
395+
class C_45165: P_45165 {
396+
#^ISSUE_45165_WHERE_CLAUSE?keywords=false^#
395397
}
396398

397-
// SR2560_WHERE_CLAUSE: Begin completions
398-
// SR2560_WHERE_CLAUSE: Decl[InstanceMethod]/Super: func foo<S>(x: S) where S : Sequence, S.Element == Int {|};
399-
// SR2560_WHERE_CLAUSE: End completions
399+
// ISSUE_45165_WHERE_CLAUSE: Begin completions
400+
// ISSUE_45165_WHERE_CLAUSE: Decl[InstanceMethod]/Super: func foo<S>(x: S) where S : Sequence, S.Element == Int {|};
401+
// ISSUE_45165_WHERE_CLAUSE: End completions
400402

401403
protocol HasThrowingProtocol {
402404
func foo() throws
@@ -758,10 +760,11 @@ class SynthesizedConformance5: SynthesizedConformance2 {
758760
// FIXME: 'required init(from decoder: Decoder)' is suggested twice
759761
}
760762

761-
protocol ProtocolSr14687 {
763+
// https://github.com/apple/swift/issues/57037
764+
protocol P_57037 {
762765
var value: Int { get }
763766
}
764-
struct StructSr14687: ProtocolSr14687 {
767+
struct S_57037: P_57037 {
765768
let foo = val, #^MULTI_VAR_DECL_OVERRIDE^#
766769
// MULTI_VAR_DECL_OVERRIDE: Begin completions, 1 items
767770
// MULTI_VAR_DECL_OVERRIDE-DAG: Decl[InstanceVar]/Super: value: Int;

test/IDE/complete_precedencegroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func testType() {
111111
// PRECEDENCE_GROUP-DAG: Decl[PrecedenceGroup]/OtherModule[Swift]/IsSystem: AssignmentPrecedence; name=AssignmentPrecedence
112112
// PRECEDENCE_GROUP-DAG: Decl[PrecedenceGroup]/OtherModule[Swift]/IsSystem: ComparisonPrecedence; name=ComparisonPrecedence
113113

114-
/* FIXME: SR-8898 We only see precedence groups that are earlier in life! */
114+
/* FIXME: (https://github.com/apple/swift/issues/51404) We only see precedence groups that are earlier in life! */
115115
// PRECEDENCE_GROUP_CURRFILE-DAG: Begin completions
116116
// PRECEDENCE_GROUP_CURRFILE-DAG: Decl[PrecedenceGroup]/CurrModule: MyPrecedence{{[0-9]+}};
117117
// PRECEDENCE_GROUP_CURRFILE-DAG: Decl[PrecedenceGroup]/CurrModule: MyPrecedence{{[0-9]+}};

test/IDE/complete_protocol_static_member.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ func test2<T: FontStyle>(x: T) {
4747
// COMPLETE_ON_GENERIC_FUNC: End completions
4848
}
4949

50-
struct Sr12973 {}
50+
// https://github.com/apple/swift/issues/55419
51+
52+
struct Struct {}
5153
struct Indicator<T> {}
52-
extension Indicator where T == Sr12973 {
53-
static var activity: Indicator<Sr12973> { fatalError() }
54+
extension Indicator where T == Struct {
55+
static var activity: Indicator<Struct> { fatalError() }
5456
}
5557

5658
func receiver<T>(_ inidicator: Indicator<T>) {}
@@ -60,7 +62,7 @@ func test() {
6062
}
6163
// COMPLETE_GENERIC_TYPE: Begin completions, 2 items
6264
// COMPLETE_GENERIC_TYPE: Decl[Constructor]/CurrNominal/TypeRelation[Convertible]: init()[#Indicator<T>#];
63-
// COMPLETE_GENERIC_TYPE: Decl[StaticVar]/CurrNominal/TypeRelation[Convertible]: activity[#Indicator<Sr12973>#];
65+
// COMPLETE_GENERIC_TYPE: Decl[StaticVar]/CurrNominal/TypeRelation[Convertible]: activity[#Indicator<Struct>#];
6466
// COMPLETE_GENERIC_TYPE: End completions
6567

6668
func testRecursive<T>(_ inidicator: Indicator<T>) {

test/IDE/complete_sr13271.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: %swift-ide-test -code-completion -source-filename=%s -code-completion-token=B | %FileCheck %s --check-prefix=B
33
// RUN: %swift-ide-test -code-completion -source-filename=%s -code-completion-token=D | %FileCheck %s --check-prefix=D
44

5-
// https://bugs.swift.org/browse/SR-13271
5+
// https://github.com/apple/swift/issues/55711
66
// https://forums.swift.org/t/code-completion-enhancement-request/38677
77

88
enum AIdentifier {

test/IDE/complete_sr13574.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OVERRIDE | %FileCheck %s --check-prefix=OVERRIDE
22
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER | %FileCheck %s --check-prefix=MEMBER
33

4+
// https://github.com/apple/swift/issues/56012
5+
46
class Root {
57
func onRoot() {}
68
}

test/IDE/complete_sr14454.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
22

3+
// https://github.com/apple/swift/issues/56810
4+
35
struct Foo {
46
let bar: Bool
57
}

test/IDE/complete_sr14455.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE | %FileCheck %s
22

3+
// https://github.com/apple/swift/issues/56811
4+
35
public enum Endpoint {
46
  case movieDetail
57

test/IDE/complete_sr14711.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %swift-ide-test --code-completion --source-filename %s --code-completion-token=COMPLETE | %FileCheck %s
22

3+
// https://github.com/apple/swift/issues/57061
4+
35
struct TodaySectionEditView {
46
var sections: [SectionHeaderView2] = []
57
@ViewBuilder2 var body: some View2 {

test/IDE/complete_sr14916.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %swift-ide-test -code-completion -code-completion-token COMPLETE -source-filename %s | %FileCheck %s
22

3+
// https://github.com/apple/swift/issues/57263
4+
35
struct Foo {
46
var bar: Int
57
}

test/IDE/complete_user_accessible.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// Check that serialized non user accessible functions are not autocompleted.
22
/// rdar://problem/53891642
3-
/// SR-7460
3+
/// https://github.com/apple/swift/issues/50003
44

55
// RUN: %empty-directory(%t)
66
// RUN: %target-swift-frontend -emit-module %S/Inputs/complete_user_accessibility_helper.swift -module-name helper -emit-module-path %t/helper.swiftmodule

test/IDE/print_ast_tc_decls_errors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ typealias Typealias1 = FooNonExistentProtocol // expected-error {{cannot find ty
169169
// NO-TYREPR: {{^}}typealias Typealias1 = <<error type>>{{$}}
170170
// TYREPR: {{^}}typealias Typealias1 = FooNonExistentProtocol{{$}}
171171

172-
// sr-197
172+
// https://github.com/apple/swift/issues/42819
173173
func foo(bar: Typealias1<Int>) {} // Should not generate error "cannot specialize non-generic type '<<error type>>'"
174174

175175
// Associated types.

test/IDE/range_info_basics.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,18 @@ func testDefer() {
149149
}
150150
}
151151

152+
// https://github.com/apple/swift/issues/55404
152153
func testPropertyWrapper() {
153154
@propertyWrapper
154-
public struct SR12958 {
155+
public struct Wrapper {
155156
public var wrappedValue: String
156157
init(_ wrappedValue: String) {
157158
self.wrappedValue = wrappedValue
158159
}
159160
}
160161

161162
public struct MyStruct {
162-
@SR12958("something")
163+
@Wrapper("something")
163164
public static var somevar: String
164165
public static var someothervar: Int
165166
}
@@ -204,7 +205,7 @@ func testPropertyWrapper() {
204205
// RUN: %target-swift-ide-test -range -pos=133:1 -end-pos=135:65 -source-filename %s | %FileCheck %s -check-prefix=CHECK-NO-PATTERN
205206
// RUN: %target-swift-ide-test -range -pos=142:12 -end-pos=142:17 -source-filename %s | %FileCheck %s -check-prefix=CHECK-X-Y
206207
// RUN: %target-swift-ide-test -range -pos=147:1 -end-pos=150:1 -source-filename %s | %FileCheck %s -check-prefix=CHECK-INVALID
207-
// RUN: %target-swift-ide-test -range -pos=162:5 -end-pos=163:38 -source-filename %s | %FileCheck %s -check-prefix=CHECK-PROPERTY-WRAPPER
208+
// RUN: %target-swift-ide-test -range -pos=163:5 -end-pos=164:38 -source-filename %s | %FileCheck %s -check-prefix=CHECK-PROPERTY-WRAPPER
208209

209210

210211
// CHECK-NO-PATTERN: <Kind>MultiStatement</Kind>
@@ -504,7 +505,7 @@ func testPropertyWrapper() {
504505
// CHECK-X-Y: <Referenced>y</Referenced><Type>Int</Type>
505506

506507
// CHECK-PROPERTY-WRAPPER: <Kind>SingleDecl</Kind>
507-
// CHECK-PROPERTY-WRAPPER-NEXT: <Content>@SR12958("something")
508+
// CHECK-PROPERTY-WRAPPER-NEXT: <Content>@Wrapper("something")
508509
// CHECK-PROPERTY-WRAPPER-NEXT: public static var somevar: String</Content>
509510
// CHECK-PROPERTY-WRAPPER-NEXT: <Context>swift_ide_test.(file).testPropertyWrapper().MyStruct</Context>
510511
// CHECK-PROPERTY-WRAPPER-NEXT: <Declared>somevar</Declared><OutscopeReference>false</OutscopeReference>

0 commit comments

Comments
 (0)