Skip to content

Commit bd220d5

Browse files
Merge pull request #60868 from AnthonyLatsis/migrate-test-suite-to-gh-issues-15
Gardening: Migrate test suite to GH issues p. 15
2 parents a973fe5 + a65f1a1 commit bd220d5

40 files changed

+135
-89
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;

0 commit comments

Comments
 (0)