diff --git a/test/IDE/Inputs/foo_swift_module.printed.comments.txt b/test/IDE/Inputs/foo_swift_module.printed.comments.txt index 3f4557cea9341..07094ce0d318c 100644 --- a/test/IDE/Inputs/foo_swift_module.printed.comments.txt +++ b/test/IDE/Inputs/foo_swift_module.printed.comments.txt @@ -39,7 +39,7 @@ enum MyQuickLookObject { } var globalVar: Int func hiddenImport() -func overlayedFoo() +func overlaidFoo() func visibleImport() precedencegroup High { associativity: left diff --git a/test/IDE/Inputs/foo_swift_module.swift b/test/IDE/Inputs/foo_swift_module.swift index e9618f575b207..9a89f036588da 100644 --- a/test/IDE/Inputs/foo_swift_module.swift +++ b/test/IDE/Inputs/foo_swift_module.swift @@ -20,7 +20,7 @@ internal postfix func =->(lhs: Int) -> Int { public func visibleImport() {} public func hiddenImport() {} -public func overlayedFoo() {} +public func overlaidFoo() {} public var globalVar: Int = 0 diff --git a/test/IDE/Inputs/foo_swift_module_overlay.swift b/test/IDE/Inputs/foo_swift_module_overlay.swift index 7e4613b9cf4f0..4496520561480 100644 --- a/test/IDE/Inputs/foo_swift_module_overlay.swift +++ b/test/IDE/Inputs/foo_swift_module_overlay.swift @@ -1,5 +1,5 @@ @_exported import FooSwiftModule -public func overlayedFoo() {} +public func overlaidFoo() {} public func onlyInFooOverlay() {} diff --git a/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlaid.h b/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlaid.h new file mode 100644 index 0000000000000..9986ddcd1ecf8 --- /dev/null +++ b/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlaid.h @@ -0,0 +1,13 @@ + +#ifndef OVERLAID_H +#define OVERLAID_H + +struct __attribute__((swift_name("Overlaid"))) OVOverlaid { + double x, y, z; +}; + +double OVOverlaidInOriginalFunc(struct OVOverlaid s) __attribute__((swift_name("Overlaid.inOriginalFunc(self:)"))); + +struct OVOverlaid createOverlaid(); + +#endif diff --git a/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/OverlayTest.h b/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/OverlayTest.h index b91209ef648da..48aa81a9956f5 100644 --- a/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/OverlayTest.h +++ b/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/OverlayTest.h @@ -1,2 +1,2 @@ -#include +#include diff --git a/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlayed.h b/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlayed.h deleted file mode 100644 index 48336b32085b6..0000000000000 --- a/test/IDE/Inputs/mock-sdk/OverlayTest.framework/Headers/Overlayed.h +++ /dev/null @@ -1,13 +0,0 @@ - -#ifndef OVERLAYED_H -#define OVERLAYED_H - -struct __attribute__((swift_name("Overlayed"))) OVOverlayed { - double x, y, z; -}; - -double OVOverlayedInOriginalFunc(struct OVOverlayed s) __attribute__((swift_name("Overlayed.inOriginalFunc(self:)"))); - -struct OVOverlayed createOverlayed(); - -#endif diff --git a/test/IDE/Inputs/mock-sdk/OverlayTest.swiftinterface b/test/IDE/Inputs/mock-sdk/OverlayTest.swiftinterface index ad75d7f67b6ea..3727cff448652 100644 --- a/test/IDE/Inputs/mock-sdk/OverlayTest.swiftinterface +++ b/test/IDE/Inputs/mock-sdk/OverlayTest.swiftinterface @@ -3,8 +3,8 @@ @_exported import OverlayTest -public extension Overlayed { +public extension Overlaid { public func inOverlayFunc() {} } -public func createOverlayedInOverlay() -> Overlayed +public func createOverlaidInOverlay() -> Overlaid diff --git a/test/IDE/complete_accessor.swift b/test/IDE/complete_accessor.swift index 4645dc88c47d6..33b3ce25b86cb 100644 --- a/test/IDE/complete_accessor.swift +++ b/test/IDE/complete_accessor.swift @@ -116,7 +116,7 @@ extension UNKNOWN_TYPE { get {} #^UNKNOWN_EXT_PROPERTY_SECOND?check=NO_GLOBAL;check=NO_SELF;check=WITH_GETSET;check=WITH_OBSERVER^# } - subscript(_1 index: T) -> T where T: ANOTHER_UNKNWON_TYPE { + subscript(_1 index: T) -> T where T: ANOTHER_UNKNOWN_TYPE { #^UNKNOWN_EXT_SUBSCRIPT_FIRST?check=WITH_GLOBAL;check=WITH_SELF;check=WITH_GETSET;check=NO_OBSERVER^# } subscript(_2 index: Int) -> String { diff --git a/test/IDE/complete_attributes.swift b/test/IDE/complete_attributes.swift index 569a38d91db84..a8a2c635d6251 100644 --- a/test/IDE/complete_attributes.swift +++ b/test/IDE/complete_attributes.swift @@ -23,9 +23,9 @@ struct MyValue { // MEMBER_MyValue-DAG: Decl[Constructor]/CurrNominal: init()[#MyValue#]; // MEMBER_MyValue-DAG: Decl[StaticVar]/CurrNominal: val[#Int#]; -class TestUnkownDanglingAttr1 { - @UknownAttr(arg: MyValue.#^ATTRARG_MEMBER^#) +class TestUnknownDanglingAttr1 { + @UnknownAttr(arg: MyValue.#^ATTRARG_MEMBER^#) } -class TestUnkownDanglingAttr2 { - @UknownAttr(arg: { MyValue.#^ATTRARG_MEMBER_IN_CLOSURE^# }) +class TestUnknownDanglingAttr2 { + @UnknownAttr(arg: { MyValue.#^ATTRARG_MEMBER_IN_CLOSURE^# }) } diff --git a/test/IDE/complete_call_arg.swift b/test/IDE/complete_call_arg.swift index 33acc03d41682..73acf9133bd52 100644 --- a/test/IDE/complete_call_arg.swift +++ b/test/IDE/complete_call_arg.swift @@ -650,7 +650,7 @@ func testImplicitMemberInArrayLiteral() { struct Wrap { func method(_ fn: (T) -> U) -> Wrap {} } -func testGenricMethodOnGenericOfArchetype(value: Wrap) { +func testGenericMethodOnGenericOfArchetype(value: Wrap) { value.method(#^ARCHETYPE_GENERIC_1^#) // ARCHETYPE_GENERIC_1: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]: ['(']{#(fn): (Wrapped) -> U##(Wrapped) -> U#}[')'][#Wrap#]; } @@ -780,7 +780,7 @@ func testAfterVariadic() { } } -func testClosurePlaceholderContainsInternalParameterNamesIfPresentInSiganture() { +func testClosurePlaceholderContainsInternalParameterNamesIfPresentInSignature() { func sort(callback: (_ left: Int, _ right: Int) -> Bool) {} sort(#^CLOSURE_PARAM_WITH_INTERNAL_NAME^#) // CLOSURE_PARAM_WITH_INTERNAL_NAME: Begin completions, 1 item @@ -1072,16 +1072,16 @@ func testArgsAfterCompletion() { // INVALID_MISSINGCONFORMANCE-DAG: Pattern/Local/Flair[ArgLabels]: {#p: String#}[#String#]; name=p: // INVALID_MISSINGCONFORMANCE-DAG: Pattern/Local/Flair[ArgLabels]: {#y: String#}[#String#]; name=y: - overloadedGeneric(x: 1, #^INVALID_MISSINGCONFORMANCE_NOCOMMA?check=INVALID_MISSINGCONFORMANCE^# z: MisingConformance(), zz: MissingConformance()) + overloadedGeneric(x: 1, #^INVALID_MISSINGCONFORMANCE_NOCOMMA?check=INVALID_MISSINGCONFORMANCE^# z: MissingConformance(), zz: MissingConformance()) overloadedGeneric(x: 1, #^INVALID_MISSINGCONFORMANCE_INDIRECT?check=INVALID_MISSINGCONFORMANCE^#, z: [MissingConformance()], zz: [MissingConformance()]) - overloadedGeneric(x: 1, #^INVALID_MISSINGCONFORMANCE_CONSTRAINT?check=INVALID_MISSINGCONFORMANCE_CONSTAINT^#, z: [CondConfType("foo")], zz: [CondConfType("bar")]) - SubOverloadedGeneric()[x: 1, #^INVALID_MISSINGCONFORMANCE_NOCOMMA_SUB?check=INVALID_MISSINGCONFORMANCE^# z: MisingConformance(), zz: MissingConformance()] + overloadedGeneric(x: 1, #^INVALID_MISSINGCONFORMANCE_CONSTRAINT?check=INVALID_MISSINGCONFORMANCE_CONSTRAINT^#, z: [CondConfType("foo")], zz: [CondConfType("bar")]) + SubOverloadedGeneric()[x: 1, #^INVALID_MISSINGCONFORMANCE_NOCOMMA_SUB?check=INVALID_MISSINGCONFORMANCE^# z: MissingConformance(), zz: MissingConformance()] SubOverloadedGeneric()[x: 1, #^INVALID_MISSINGCONFORMANCE_INDIRECT_SUB?check=INVALID_MISSINGCONFORMANCE^#, z: [MissingConformance()], zz: [MissingConformance()]] - SubOverloadedGeneric()[x: 1, #^INVALID_MISSINGCONFORMANCE_CONSTRAINT_SUB?check=INVALID_MISSINGCONFORMANCE_CONSTAINT^#, z: [CondConfType("foo")], zz: [CondConfType("bar")]] + SubOverloadedGeneric()[x: 1, #^INVALID_MISSINGCONFORMANCE_CONSTRAINT_SUB?check=INVALID_MISSINGCONFORMANCE_CONSTRAINT^#, z: [CondConfType("foo")], zz: [CondConfType("bar")]] - // INVALID_MISSINGCONFORMANCE_CONSTAINT: Begin completions, 2 items - // INVALID_MISSINGCONFORMANCE_CONSTAINT-DAG: Pattern/Local/Flair[ArgLabels]: {#y: String#}[#String#]; name=y: - // INVALID_MISSINGCONFORMANCE_CONSTAINT-DAG: Pattern/Local/Flair[ArgLabels]: {#p: String#}[#String#]; name=p: + // INVALID_MISSINGCONFORMANCE_CONSTRAINT: Begin completions, 2 items + // INVALID_MISSINGCONFORMANCE_CONSTRAINT-DAG: Pattern/Local/Flair[ArgLabels]: {#y: String#}[#String#]; name=y: + // INVALID_MISSINGCONFORMANCE_CONSTRAINT-DAG: Pattern/Local/Flair[ArgLabels]: {#p: String#}[#String#]; name=p: } func testFuncTyVars(param: (Int, String, Double) -> ()) { diff --git a/test/IDE/complete_call_pattern.swift b/test/IDE/complete_call_pattern.swift index 9dbc0d762bd75..69fd4e071d1ee 100644 --- a/test/IDE/complete_call_pattern.swift +++ b/test/IDE/complete_call_pattern.swift @@ -10,16 +10,16 @@ struct FooStruct { func testInsideFunctionCall_1(_ x: inout FooStruct) { x.instanceFunc(#^BEFORE_COMMA^#, // BEFORE_COMMA-NOT: Pattern/{{.*}}:{{.*}}({{.*}}{#Int#} -// BOFORE_COMMA-NOT: Decl[InstanceMethod]/{{.*}}:{{.*}}({{.*}}{#Int#} +// BEFORE_COMMA-NOT: Decl[InstanceMethod]/{{.*}}:{{.*}}({{.*}}{#Int#} } func testInsideFunctionCall_2(_ x: inout FooStruct) { x.instanceFunc(#^BEFORE_PLACEHOLDER^#<#placeholder#> // BEFORE_PLACEHOLDER-NOT: Pattern/{{.*}}:{{.*}}({{.*}}{#Int#} -// BOFORE_PLACEHOLDER-NOT: Decl[InstanceMethod]/{{.*}}:{{.*}}({{.*}}{#Int#} +// BEFORE_PLACEHOLDER-NOT: Decl[InstanceMethod]/{{.*}}:{{.*}}({{.*}}{#Int#} } func testConstructor() { FooStruct(#^CONSTRUCTOR^#, -// CONSTURCTOR: Begin completions, 3 items +// CONSTRUCTOR: Begin completions, 3 items // CONSTRUCTOR-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['('][')'][#FooStruct#]; // CONSTRUCTOR-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#a: Int#}[')'][#FooStruct#]; // CONSTRUCTOR-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#a: Int#}, {#b: Float#}[')'][#FooStruct#]; diff --git a/test/IDE/complete_concurrency_specifier.swift b/test/IDE/complete_concurrency_specifier.swift index 0162ede5d650c..62ead1b4b286c 100644 --- a/test/IDE/complete_concurrency_specifier.swift +++ b/test/IDE/complete_concurrency_specifier.swift @@ -20,14 +20,14 @@ func testSpecifierWithAsync() async #^SPECIFIER_WITHASYNC^# func testSpecifierWithThrows() throws #^SPECIFIER_WITHTHROWS^# func testSpecifierWithAsyncThorws() async throws #^SPECIFIER_WITHASYNCTHROWS^# -func testTypeSpecifier(_: () #^TYPE_SPECIFICER?check=SPECIFIER^#) {} -func testTypeSpecifierWithAsync(_: () async #^TYPE_SPECIFICER_WITHASYNC?check=SPECIFIER_WITHASYNC^#) {} -func testTypeSpecifierWithThrows(_: () throws #^TYPE_SPECIFICER_WITHTHROWS?check=SPECIFIER_WITHTHROWS^#) {} -func testTypeSpecifierWithAsyncThrows(_: () async throws #^TYPE_SPECIFICER_WITHASYNCTHROWS?check=SPECIFIER_WITHASYNCTHROWS^#) {} -func testTypeSpecifierWithArrow(_: () #^TYPE_SPECIFICER_WITHARROW?check=SPECIFIER^#) {} -func testTypeSpecifierWithAsyncArrow(_: () async #^TYPE_SPECIFICER_WITHASYNCARROW?check=SPECIFIER_WITHASYNC^# -> Void) {} -func testTypeSpecifierWithThrowsArrow(_: () throws #^TYPE_SPECIFICER_WITHTHROWSARROW?check=SPECIFIER_WITHTHROWS^# -> Void -func testTypeSpecifierWithAsyncThrowsArrow(_: () async throws #^TYPE_SPECIFICER_WITHASYNCTHROWSARROW?check=SPECIFIER_WITHASYNCTHROWS^# -> Void) {} +func testTypeSpecifier(_: () #^TYPE_SPECIFIER?check=SPECIFIER^#) {} +func testTypeSpecifierWithAsync(_: () async #^TYPE_SPECIFIER_WITHASYNC?check=SPECIFIER_WITHASYNC^#) {} +func testTypeSpecifierWithThrows(_: () throws #^TYPE_SPECIFIER_WITHTHROWS?check=SPECIFIER_WITHTHROWS^#) {} +func testTypeSpecifierWithAsyncThrows(_: () async throws #^TYPE_SPECIFIER_WITHASYNCTHROWS?check=SPECIFIER_WITHASYNCTHROWS^#) {} +func testTypeSpecifierWithArrow(_: () #^TYPE_SPECIFIER_WITHARROW?check=SPECIFIER^#) {} +func testTypeSpecifierWithAsyncArrow(_: () async #^TYPE_SPECIFIER_WITHASYNCARROW?check=SPECIFIER_WITHASYNC^# -> Void) {} +func testTypeSpecifierWithThrowsArrow(_: () throws #^TYPE_SPECIFIER_WITHTHROWSARROW?check=SPECIFIER_WITHTHROWS^# -> Void +func testTypeSpecifierWithAsyncThrowsArrow(_: () async throws #^TYPE_SPECIFIER_WITHASYNCTHROWSARROW?check=SPECIFIER_WITHASYNCTHROWS^# -> Void) {} _ = { () #^CLOSURE?check=SPECIFIER^# in } _ = { () async #^CLOSURE_WITHASYNC?check=SPECIFIER_WITHASYNC^# in } diff --git a/test/IDE/complete_constrained.swift b/test/IDE/complete_constrained.swift index 6e40ef0cc8f43..6e6eba15d3014 100644 --- a/test/IDE/complete_constrained.swift +++ b/test/IDE/complete_constrained.swift @@ -126,7 +126,7 @@ func testVegetarian(chef: Chef) { let _ = chefMeta.init(.#^CONDITIONAL_OVERLOAD_INIT_ARG^#) chef.eat(.#^CONDITIONAL_INAPPLICABLE_ARG^#) -// Note: 'eat' is from an inapplicable constrained extension. We complete as if the user intends to addess that later +// Note: 'eat' is from an inapplicable constrained extension. We complete as if the user intends to address that later // (e.g. by adding the missing 'Meat' conformance to 'Vegetarian' - clearly not the intention here - but replace 'Meat' with 'Equatable'). // CONDITIONAL_INAPPLICABLE_ARG: Begin completions, 2 items // CONDITIONAL_INAPPLICABLE_ARG-DAG: Decl[EnumElement]/CurrNominal/Flair[ExprSpecific]/TypeRelation[Convertible]: chicken[#Meat#]; name=chicken diff --git a/test/IDE/complete_constructor.swift b/test/IDE/complete_constructor.swift index 0727ee358fd64..dc64563bf3ece 100644 --- a/test/IDE/complete_constructor.swift +++ b/test/IDE/complete_constructor.swift @@ -233,7 +233,7 @@ func testHaveComma1() { ExplicitConstructors1(#^HAVE_COMMA_1?check=EXPLICIT_CONSTRUCTORS_1P^#, } -//===--- Test that we show default constuctors inherited from protocols +//===--- Test that we show default constructors inherited from protocols protocol ProtDefaultInit {} extension ProtDefaultInit { init(foo: Int) {}} diff --git a/test/IDE/complete_crossmodule.swift b/test/IDE/complete_crossmodule.swift index bd29b3ec5aaf6..ed91223a46f4e 100644 --- a/test/IDE/complete_crossmodule.swift +++ b/test/IDE/complete_crossmodule.swift @@ -7,8 +7,8 @@ // BEGIN MyModule.swift public protocol HasAssocWithConstraint { - associatedtype AssocWithContraint: HasAssocWithConstraint - var value: AssocWithContraint { get } + associatedtype AssocWithConstraint: HasAssocWithConstraint + var value: AssocWithConstraint { get } } // BEGIN Test.swift diff --git a/test/IDE/complete_decl_attribute.swift b/test/IDE/complete_decl_attribute.swift index 5d656c4e4d5d0..437fb135cbee4 100644 --- a/test/IDE/complete_decl_attribute.swift +++ b/test/IDE/complete_decl_attribute.swift @@ -54,7 +54,7 @@ actor MyGlobalActor { @globalActor actor MyGenericGlobalActor { - static let shared = MyGenricGlobalActor() + static let shared = MyGenericGlobalActor() } @available(#^AVAILABILITY1^#) diff --git a/test/IDE/complete_expr_after_paren.swift b/test/IDE/complete_expr_after_paren.swift index e4bd1e596c7f9..4a4e2cedffb9f 100644 --- a/test/IDE/complete_expr_after_paren.swift +++ b/test/IDE/complete_expr_after_paren.swift @@ -34,7 +34,7 @@ class MyClass: Base, MyProtocol { override func method(method4: Int) {} } -func testConstructer() { +func testConstructor() { MyClass(#^INITIALIZER^#) // INITIALIZER: Begin completions, 4 items // INITIALIZER-DAG: Decl[Constructor]/CurrNominal/Flair[ArgLabels]: ['(']{#init1: Int#}[')'][#MyClass#]; diff --git a/test/IDE/complete_from_reexport.swift b/test/IDE/complete_from_reexport.swift index 352d9df4d5cf1..2205bd389f110 100644 --- a/test/IDE/complete_from_reexport.swift +++ b/test/IDE/complete_from_reexport.swift @@ -7,13 +7,13 @@ // RUN: %FileCheck %s -check-prefix=TOP_LEVEL_1 < %t.txt // RUN: %FileCheck %s -check-prefix=NO_DUPLICATES < %t.txt -// TOP_LEVEL_1-DAG: Decl[FreeFunction]/OtherModule[FooSwiftModuleOverlay]: overlayedFoo()[#Void#]{{; name=.+$}} +// TOP_LEVEL_1-DAG: Decl[FreeFunction]/OtherModule[FooSwiftModuleOverlay]: overlaidFoo()[#Void#]{{; name=.+$}} // TOP_LEVEL_1-DAG: Decl[FreeFunction]/OtherModule[FooSwiftModuleOverlay]: onlyInFooOverlay()[#Void#]{{; name=.+$}} // FIXME: there should be only one instance of this completion result. -// NO_DUPLICATES: overlayedFoo()[#Void#]{{; name=.+$}} -// NO_DUPLICATES: overlayedFoo()[#Void#]{{; name=.+$}} -// NO_DUPLICATES-NOT: overlayedFoo()[#Void#]{{; name=.+$}} +// NO_DUPLICATES: overlaidFoo()[#Void#]{{; name=.+$}} +// NO_DUPLICATES: overlaidFoo()[#Void#]{{; name=.+$}} +// NO_DUPLICATES-NOT: overlaidFoo()[#Void#]{{; name=.+$}} import FooSwiftModuleOverlay diff --git a/test/IDE/complete_from_swift_module.swift b/test/IDE/complete_from_swift_module.swift index cb35bb92a5081..913827c88ba6e 100644 --- a/test/IDE/complete_from_swift_module.swift +++ b/test/IDE/complete_from_swift_module.swift @@ -53,8 +53,8 @@ // rdar://15305873 Code completion: implement proper shadowing of declarations represented by cached results // FIXME: %FileCheck %s -check-prefix=TOP_LEVEL_1_NEGATIVE < %t.compl.txt -// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=AMBIGOUS_RESULT_BUILER > %t.compl.txt -// RUN: %FileCheck %s -check-prefix=AMBIGOUS_RESULT_BUILER < %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=AMBIGUOUS_RESULT_BUILER > %t.compl.txt +// RUN: %FileCheck %s -check-prefix=AMBIGUOUS_RESULT_BUILER < %t.compl.txt // ERROR_COMMON: found code completion token @@ -158,11 +158,11 @@ func testAmbiguousResultBuilder() { func test() { Foo { - #^AMBIGOUS_RESULT_BUILER^# + #^AMBIGUOUS_RESULT_BUILER^# } // Results should only contain globalVar once - // AMBIGOUS_RESULT_BUILER-NOT: globalVar - // AMBIGOUS_RESULT_BUILER-DAG: Decl[GlobalVar]/OtherModule[foo_swift_module]/TypeRelation[Convertible]: globalVar[#Int#]; name=globalVar - // AMBIGOUS_RESULT_BUILER-NOT: globalVar + // AMBIGUOUS_RESULT_BUILER-NOT: globalVar + // AMBIGUOUS_RESULT_BUILER-DAG: Decl[GlobalVar]/OtherModule[foo_swift_module]/TypeRelation[Convertible]: globalVar[#Int#]; name=globalVar + // AMBIGUOUS_RESULT_BUILER-NOT: globalVar } } diff --git a/test/IDE/complete_in_closures.swift b/test/IDE/complete_in_closures.swift index f9acd0cffe741..5da2b98c0c8f6 100644 --- a/test/IDE/complete_in_closures.swift +++ b/test/IDE/complete_in_closures.swift @@ -1,6 +1,6 @@ // RUN: %batch-code-completion -// EMTPY: Token +// EMPTY: Token // EMPTY-NOT: Begin completions //===--- Helper types that are used in this test @@ -385,11 +385,11 @@ func testClosureInPatternBindingInit() { case dragging(translation: Int, predictedLocation: Int) } - func pnChanged(_ action: () -> Void) {} + func onChanged(_ action: () -> Void) {} func foo() { var gestureViewState: DragState = .dragging(translation: 0, predictedLocation: 0) - let longPressDrag = pnChanged { + let longPressDrag = onChanged { _ = 1 gestureViewState = .dragging(translation: 0, #^CLOSURE_IN_PATTERN_BINDING^#predictedLocation: 0) } diff --git a/test/IDE/complete_inout.swift b/test/IDE/complete_inout.swift index 038cee8845b22..4390ca282f71c 100644 --- a/test/IDE/complete_inout.swift +++ b/test/IDE/complete_inout.swift @@ -9,7 +9,7 @@ struct Foo { var myInt: Int func bar() { - let context = Bar(wihtInout: &self.#^COMPLETE_INOUT?check=CHECK^#) + let context = Bar(withInout: &self.#^COMPLETE_INOUT?check=CHECK^#) let context = Bar(withPointer: &self.#^COMPLETE_POINTER?check=CHECK^#) } } diff --git a/test/IDE/complete_multiple_trailingclosure_signatures.swift b/test/IDE/complete_multiple_trailingclosure_signatures.swift index cd17fe6196141..605ebb98bf797 100644 --- a/test/IDE/complete_multiple_trailingclosure_signatures.swift +++ b/test/IDE/complete_multiple_trailingclosure_signatures.swift @@ -25,7 +25,7 @@ func test() { // GLOBALFUNC_SAMELINE-DAG: Pattern/Local/Flair[ArgLabels]: {#fn8: (Int...) -> Void {<#Int...#> in|}#}[#(Int...) -> Void#]; } -func testStringAndMulipleTrailingClosures() { +func testStringAndMultipleTrailingClosures() { func stringAndClosure(_ key: String, _ body: () -> Void) {} func takeClosure(_ x: () -> Void) {} diff --git a/test/IDE/complete_opaque_result.swift b/test/IDE/complete_opaque_result.swift index 4b27c1ba58308..a1d02047da9f1 100644 --- a/test/IDE/complete_opaque_result.swift +++ b/test/IDE/complete_opaque_result.swift @@ -1,13 +1,13 @@ // RUN: %batch-code-completion protocol MyProtocol { - associatedtype Mistery + associatedtype Mystery } struct MyStruct {} enum MyEnum {} class MyClass {} struct ConcreteMyProtocol : MyProtocol { - typealias Mistery = MyStruct + typealias Mystery = MyStruct } // MARK: 'some' keyword. @@ -19,7 +19,7 @@ struct ConcreteMyProtocol : MyProtocol { // BEGINNING_WITH_SOME-DAG: Decl[Protocol]/CurrModule: MyProtocol[#MyProtocol#]; name=MyProtocol // BEGINNING_WITH_SOME-DAG: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct -func gloabalFunc() -> #^GLOBAL_FUNC?check=BEGINNING_WITH_SOME^# +func globalFunc() -> #^GLOBAL_FUNC?check=BEGINNING_WITH_SOME^# var globalVar: #^GLOBAL_VAR?check=BEGINNING_WITH_SOME^# protocol SomeProto { @@ -129,7 +129,7 @@ class HasTypealias : HasAssocWithConformanceConstraint { // OVERRIDE_HasTypealias-DAG: Decl[InstanceMethod]/Super: func returnAssocWithConformanceConstraint(fn: (Int) -> Int) -> ConcreteMyProtocol {|}; } -// MARK: Postfix expession for opaque result types. +// MARK: Postfix expression for opaque result types. protocol TestProtocol { associatedtype Assoc1 diff --git a/test/IDE/complete_overlaymodule.swift b/test/IDE/complete_overlaymodule.swift index bac7d2bcd386c..61f81fe0465d0 100644 --- a/test/IDE/complete_overlaymodule.swift +++ b/test/IDE/complete_overlaymodule.swift @@ -9,21 +9,21 @@ func testGlobalType() { // TYPE_GLOBAL-NOT: OverlayTest[#Module#] // TYPE_GLOBAL-DAG: Decl[Module]/None: OverlayTest[#Module#]; // TYPE_GLOBAL-NOT: OverlayTest[#Module#] -// TYPE_GLOBAL-DAG: Decl[Struct]/OtherModule[OverlayTest.Overlayed]: Overlayed[#Overlayed#]; +// TYPE_GLOBAL-DAG: Decl[Struct]/OtherModule[OverlayTest.Overlaid]: Overlaid[#Overlaid#]; } func testGlobalExpr() { let _ = #^EXPR_GLOBAL^# // EXPR_GLOBAL-NOT: OverlayTest[#Module#] // EXPR_GLOBAL-DAG: Decl[Module]/None: OverlayTest[#Module#]; // EXPR_GLOBAL-NOT: OverlayTest[#Module#] -// EXPR_GLOBAL-DAG: Decl[Struct]/OtherModule[OverlayTest.Overlayed]: Overlayed[#Overlayed#]; -// EXPR_GLOBAL-DAG: Decl[FreeFunction]/OtherModule[OverlayTest]: createOverlayedInOverlay()[#Overlayed#]; -// EXPR_GLOBAL-DAG: Decl[FreeFunction]/OtherModule[OverlayTest.Overlayed]: createOverlayed()[#Overlayed#]; +// EXPR_GLOBAL-DAG: Decl[Struct]/OtherModule[OverlayTest.Overlaid]: Overlaid[#Overlaid#]; +// EXPR_GLOBAL-DAG: Decl[FreeFunction]/OtherModule[OverlayTest]: createOverlaidInOverlay()[#Overlaid#]; +// EXPR_GLOBAL-DAG: Decl[FreeFunction]/OtherModule[OverlayTest.Overlaid]: createOverlaid()[#Overlaid#]; } -func testGlobalExpr(value: Overlayed) { +func testGlobalExpr(value: Overlaid) { value.#^EXPR_MEMBER^# // EXPR_MEMBER: Begin completions, 6 items -// EXPR_MEMBER-DAG: Keyword[self]/CurrNominal: self[#Overlayed#]; name=self +// EXPR_MEMBER-DAG: Keyword[self]/CurrNominal: self[#Overlaid#]; name=self // EXPR_MEMBER-DAG: Decl[InstanceVar]/CurrNominal: x[#Double#]; name=x // EXPR_MEMBER-DAG: Decl[InstanceVar]/CurrNominal: y[#Double#]; name=y // EXPR_MEMBER-DAG: Decl[InstanceVar]/CurrNominal: z[#Double#]; name=z diff --git a/test/IDE/complete_shadowing.swift b/test/IDE/complete_shadowing.swift index f1cdabe9f8caf..2070b15f98856 100644 --- a/test/IDE/complete_shadowing.swift +++ b/test/IDE/complete_shadowing.swift @@ -151,7 +151,7 @@ var globalTest: Int = 1 func test_Global_Local() { var globalTest: String = "" #^Global_Local^# -// FIXME: currently global varialbles are suggested despite they are shadowed. +// FIXME: currently global variables are suggested despite they are shadowed. // Ideally they should be suggested with the qualification (i.e. 'ModuleName.globalTest') // Global_Local-DAG: Decl[LocalVar]/Local: globalTest[#String#]; name=globalTest // Global_Local-DAG: Decl[GlobalVar]/CurrModule: globalTest[#Int#]; name=globalTest @@ -257,7 +257,7 @@ struct test_InheritedMemberProtoExt_Member: ProtoWithIntTestValueExt { } } -protocol ClassWitnIntTestValue { +protocol ClassWithIntTestValue { var testValue: Int { 1 } } struct test_InheritedMemberSuper_Member: ClassWithIntTestValue { diff --git a/test/IDE/complete_typerelation.swift b/test/IDE/complete_typerelation.swift index 6f5362afdd943..6f4362f225c5c 100644 --- a/test/IDE/complete_typerelation.swift +++ b/test/IDE/complete_typerelation.swift @@ -1,7 +1,7 @@ // RUN: %batch-code-completion -disable-objc-attr-requires-foundation-module // SE-0353 -struct ConstraintedExistentialTest { +struct ConstrainedExistentialTest { protocol Producer { associatedtype Event } @@ -20,8 +20,8 @@ struct ConstraintedExistentialTest { let stringProducer: StringProducer func test() { - takeStringProducer(self.#^IN_CONSTRAINTED_EXISTENTIAL_CONTEXT^#) + takeStringProducer(self.#^IN_CONSTRAINED_EXISTENTIAL_CONTEXT^#) } -// IN_CONSTRAINTED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal: intProducer[#IntProducer#]; -// IN_CONSTRAINTED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: stringProducer[#StringProducer#]; +// IN_CONSTRAINED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal: intProducer[#IntProducer#]; +// IN_CONSTRAINED_EXISTENTIAL_CONTEXT-DAG: Decl[InstanceVar]/CurrNominal/TypeRelation[Convertible]: stringProducer[#StringProducer#]; } diff --git a/test/IDE/complete_unresolved_members.swift b/test/IDE/complete_unresolved_members.swift index 5eec08dff6992..e5e5ff065a451 100644 --- a/test/IDE/complete_unresolved_members.swift +++ b/test/IDE/complete_unresolved_members.swift @@ -602,7 +602,7 @@ struct TestingStruct { } func testDefaultArgument(arg: SomeEnum1 = .#^DEFAULT_ARG_1?check=UNRESOLVED_3^#) {} -class TestDefalutArg { +class TestDefaultArg { func method(arg: SomeEnum1 = .#^DEFAULT_ARG_2?check=UNRESOLVED_3^#) {} init(arg: SomeEnum1 = .#^DEFAULT_ARG_3?check=UNRESOLVED_3^#) {} } diff --git a/test/IDE/complete_value_expr.swift b/test/IDE/complete_value_expr.swift index 9e416a70cd54a..501e7ba306039 100644 --- a/test/IDE/complete_value_expr.swift +++ b/test/IDE/complete_value_expr.swift @@ -1826,13 +1826,13 @@ protocol MetaProto { static func staticFunc() -> Int static var staticVar: Int { get } func instanceFunc() -> Int - var intanceVar: Int { get } + var instanceVar: Int { get } } extension MetaProto { static func staticFuncExtension() -> Int { 1 } static var staticVarExtension: Int { 1 } func instanceFuncExtension() -> Int { 1 } - var intanceVarExtension: Int { 1 } + var instanceVarExtension: Int { 1 } } func testProtocolMetatype(protoProto: MetaProto.Protocol, protoType: MetaProto.Type) { let _ = BrokenConformanceP.#^PROTOCOLMETA_1^# diff --git a/test/IDE/conforming-methods-afterclosure.swift b/test/IDE/conforming-methods-afterclosure.swift index faa168b12761d..d5ca96ecadc67 100644 --- a/test/IDE/conforming-methods-afterclosure.swift +++ b/test/IDE/conforming-methods-afterclosure.swift @@ -8,7 +8,7 @@ public struct MyStruct { public func returnSomeP -> some TargetP { ConcreteP() } public func returnConcreteP -> ConcreteP { ConcreteP() } - public func reutrnInt -> Int { 1 } + public func returnInt -> Int { 1 } } func test() { diff --git a/test/IDE/structure.swift b/test/IDE/structure.swift index 293ea300c9fdc..66cbebaf7d899 100644 --- a/test/IDE/structure.swift +++ b/test/IDE/structure.swift @@ -31,12 +31,12 @@ class MyCls : OtherClass { // CHECK: } } -// CHECK: struct MyStruc { +// CHECK: struct MyStruct { // CHECK: var myVar: Int // CHECK: static var sbar : Int = 0 // CHECK: static func cfoo() // CHECK: } -struct MyStruc { +struct MyStruct { var myVar: Int static var sbar : Int = 0 static func cfoo() @@ -61,11 +61,11 @@ protocol MyProt { init(a: T) where T: MyProt } -// CHECK: extension MyStruc { +// CHECK: extension MyStruct { // CHECK: func foo() { // CHECK: } // CHECK: } -extension MyStruc { +extension MyStruct { func foo() { } } @@ -299,8 +299,8 @@ enum FooEnum { // CHECK: enum FooEnum { case blah(x: () -> () = { // CHECK: case blah(x: () -> () = { - @Tuples func foo(x: MyStruc) {} - // CHECK: @Tuples func foo(x: MyStruc) {} + @Tuples func foo(x: MyStruct) {} + // CHECK: @Tuples func foo(x: MyStruct) {} }) // CHECK: }) }