 
 
 // RUN: %empty-directory(%t/completion-cache)
-// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token COMPLETE_OPAQUE_COMPOSITION -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=COMPLETE_OPAQUE_COMPOSITION
+// RUN: %target-swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token COMPLETE_OPAQUE_COMPOSITION -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=COMPLETE_OPAQUE_COMPOSITION
 // Perform the same completion again, this time using the code completion cache that implicitly gets added to swift-ide-test
-// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token COMPLETE_OPAQUE_COMPOSITION -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=COMPLETE_OPAQUE_COMPOSITION
+// RUN: %target-swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token COMPLETE_OPAQUE_COMPOSITION -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=COMPLETE_OPAQUE_COMPOSITION
 
 func testOpaqueComposition() -> some MyProto & MyOtherProto {
 	return #^COMPLETE_OPAQUE_COMPOSITION^#

// PROTO_WITH_ASSOC_TYPE: End completions

// RUN: %empty-directory(%t/completion-cache)
// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token PROTO_WITH_ASSOC_TYPE_OPAQUE_CONTEXT -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=PROTO_WITH_ASSOC_TYPE
// Perform the same completion again, this time using the code completion cache
// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token PROTO_WITH_ASSOC_TYPE_OPAQUE_CONTEXT -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=PROTO_WITH_ASSOC_TYPE
func protoWithAssocTypeInOpaqueContext() -> some ProtoWithAssocType {
  return #^PROTO_WITH_ASSOC_TYPE_OPAQUE_CONTEXT^#
}

// RUN: %empty-directory(%t/completion-cache)
// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token PROTO_WITH_ASSOC_TYPE_GENERIC_RETURN_CONTEXT -completion-cache-path %t/completion-cache -I %t/ImportPath
// Perform the same completion again, this time using the code completion cache
// RUN: %swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token PROTO_WITH_ASSOC_TYPE_GENERIC_RETURN_CONTEXT -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=PROTO_WITH_ASSOC_TYPE_GENERIC_RETURN_CONTEXT
func protoWithAssocTypeInGenericContext<T: ProtoWithAssocType>() -> T {
  return #^PROTO_WITH_ASSOC_TYPE_GENERIC_RETURN_CONTEXT^#
}

// ALSO_CONSIDER_METATYPE: End completions

// RUN: %empty-directory(%t/completion-cache)
// RUN: %target-swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token OPAQUE_WITH_CLASS -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=OPAQUE_WITH_CLASS
// Perform the same completion again, this time using the code completion cache
// RUN: %target-swift-ide-test -code-completion -source-filename %t/test.swift -code-completion-token OPAQUE_WITH_CLASS -completion-cache-path %t/completion-cache -I %t/ImportPath | %FileCheck %s --check-prefix=OPAQUE_WITH_CLASS
func testOpaqueWithClass<T: MyClass & MyProto>() -> T {
  return #^OPAQUE_WITH_CLASS^#
}
