Skip to content

Commit 0167bb6

Browse files
committed
[CodeCompletion] Fix and re-enable test/IDE/complete_from_clang_framework.swift
This test was broken a while ago by some duplicate completions showing up from clang modules, but that has since been fixed. At this point there were just some minor changes needed to bring the test up-to-date with the Foo framework code in the mock-sdk. rdar://problem/26484635
1 parent 3c9c520 commit 0167bb6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/IDE/complete_from_clang_framework.swift

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// REQUIRES: disabled
21
// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=SWIFT_COMPLETIONS | FileCheck %s -check-prefix=SWIFT_COMPLETIONS
32

43
// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FW_UNQUAL_1 > %t.compl.txt
@@ -147,7 +146,7 @@ func testCompleteModuleQualifiedFoo2() {
147146
Foo#^CLANG_QUAL_FOO_2^#
148147
// If the number of results below changes, then you need to add a result to the
149148
// list below.
150-
// CLANG_QUAL_FOO_2: Begin completions, 62 items
149+
// CLANG_QUAL_FOO_2: Begin completions, 64 items
151150
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooClassBase[#FooClassBase#]{{; name=.+$}}
152151
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooClassDerived[#FooClassDerived#]{{; name=.+$}}
153152
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .ClassWithInternalProt[#ClassWithInternalProt#]{{; name=.+$}}
@@ -161,7 +160,7 @@ func testCompleteModuleQualifiedFoo2() {
161160
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncNoreturn1()[#Void#]{{; name=.+$}}
162161
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncNoreturn2()[#Void#]{{; name=.+$}}
163162
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithBlock({#(blk): ((Float) -> Int32)!##(Float) -> Int32#})[#Void#]{{; name=.+$}}
164-
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithFunctionPointer({#(fptr): CFunctionPointer<((Float) -> Int32)>#})[#Void#]{{; name=.+$}}
163+
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithFunctionPointer({#(fptr): ((Float) -> Int32)!##(Float) -> Int32#})[#Void#]{{; name=.+$}}
165164
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithComment1()[#Void#]{{; name=.+$}}
166165
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithComment2()[#Void#]{{; name=.+$}}
167166
// CLANG_QUAL_FOO_2-DAG: Decl[FreeFunction]/OtherModule[Foo]: .fooFuncWithComment3()[#Void#]{{; name=.+$}}
@@ -208,8 +207,10 @@ func testCompleteModuleQualifiedFoo2() {
208207
// CLANG_QUAL_FOO_2-DAG: Decl[TypeAlias]/OtherModule[Foo]: .FooStructTypedef1[#FooStruct2#]{{; name=.+$}}
209208
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooUnavailableMembers[#FooUnavailableMembers#]
210209
// CLANG_QUAL_FOO_2-DAG: Decl[TypeAlias]/OtherModule[Foo]: .FooTypedef1[#Int32#]{{; name=.+$}}
211-
// CLANG_QUAL_FOO_2-DAG: Decl[TypeAlias]/OtherModule[Foo]: .FooCFTypeRef[#FooCFType#]{{; name=.+$}}
210+
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooCFType[#FooCFType#]{{; name=.+$}}
212211
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooRepeatedMembers[#FooRepeatedMembers#]{{; name=.+$}}
212+
// CLANG_QUAL_FOO_2-DAG: Decl[Class]/OtherModule[Foo]: .FooClassWithClassProperties[#FooClassWithClassProperties#];
213+
// CLANG_QUAL_FOO_2-DAG: Decl[Enum]/OtherModule[Foo]: .SCNFilterMode[#SCNFilterMode#];
213214
// CLANG_QUAL_FOO_2: End completions
214215
}
215216

@@ -223,7 +224,7 @@ func testCompleteModuleQualifiedBar1() {
223224
func testCompleteFunctionCall1() {
224225
fooFunc1#^FUNCTION_CALL_1^#
225226
// FUNCTION_CALL_1: Begin completions
226-
// FUNCTION_CALL_1-NEXT: Pattern/ExprSpecific: ({#Int32#})[#Int32#]{{; name=.+$}}
227+
// FUNCTION_CALL_1-NEXT: Pattern/ExprSpecific: ({#(a): Int32#})[#Int32#]{{; name=.+$}}
227228
// FUNCTION_CALL_1-NEXT: End completions
228229
}
229230

@@ -255,6 +256,7 @@ func testCompleteClassMembers1() {
255256
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[StaticMethod]/CurrNominal: .fooBaseInstanceFuncOverridden()[#Void#]{{; name=.+$}}
256257
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[InstanceMethod]/CurrNominal: .fooBaseInstanceFuncOverridden({#self: FooClassBase#})[#() -> Void#]{{; name=.+$}}
257258
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[StaticMethod]/CurrNominal: .fooBaseClassFunc0()[#Void#]{{; name=.+$}}
259+
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[Constructor]/CurrNominal: ({#(x): Int32#})[#FooClassBase!#]
258260
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[StaticMethod]/CurrNominal: ._internalMeth3()[#AnyObject!#]
259261
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[InstanceMethod]/CurrNominal: ._internalMeth3({#self: FooClassBase#})[#() -> AnyObject!#]
260262
// CLANG_CLASS_MEMBERS_1-NEXT: Decl[StaticMethod]/CurrNominal: ._internalMeth2()[#AnyObject!#]
@@ -317,5 +319,5 @@ func testCompleteInstanceMembers1(fooObject: FooClassDerived) {
317319
// CLANG_INSTANCE_MEMBERS_1-NEXT: Decl[InstanceMethod]/Super: ._internalMeth2()[#AnyObject!#]
318320
// CLANG_INSTANCE_MEMBERS_1-NEXT: Decl[InstanceMethod]/Super: .nonInternalMeth()[#AnyObject!#]
319321
// CLANG_INSTANCE_MEMBERS_1-NEXT: Decl[InstanceMethod]/Super: ._internalMeth1()[#AnyObject!#]
320-
// CLANG_INSTANCE_MEMBERS_1-NEXT: End completions
322+
// CLANG_INSTANCE_MEMBERS_1-NOT: Instance
321323
}

0 commit comments

Comments
 (0)