mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These tests were relying on sourcekitd parsing as frontend instead of using the driver. Update them now to avoid churn when we fix command line argument parsing in sourcekit. The changes from clang-importer-sdk to clang-importer-sdk-nosource -I %t are because clang-importer-sdk implies using -enable-source-import. Rather than hack them up to use -Xfrontend, it is cleaner to just stop using source import at all for these tests. Incidentally, this improved fidelity in a few places. When using the generated swift modules we also need to pass a target triple to sourcekit, which exposed some tests that had mac-specific data. This is a systemic issue for sourcekit tests, but for now just make those few specific tests that we had problems with run only on mac.
22 lines
1.1 KiB
Swift
22 lines
1.1 KiB
Swift
// REQUIRES: objc_interop
|
|
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %build-clang-importer-objc-overlays
|
|
|
|
// RUN: %sourcekitd-test -req=interface-gen %S/Inputs/Foo2.swift -- %S/Inputs/Foo2.swift %mcp_opt -target %target-triple %clang-importer-sdk-nosource -I %t > %t.response
|
|
// RUN: diff -u %s.response %t.response
|
|
|
|
// RUN: %sourcekitd-test -req=interface-gen-open %S/Inputs/Foo2.swift -- %S/Inputs/Foo2.swift %mcp_opt -target %target-triple %clang-importer-sdk-nosource -I %t \
|
|
// RUN: == -req=cursor -pos=18:49 | %FileCheck -check-prefix=CHECK1 %s
|
|
// The cursor points to 'FooOverlayClassBase' inside the list of base classes, see 'gen_swift_source.swift.response'
|
|
|
|
// CHECK1: FooOverlayClassBase
|
|
// CHECK1: s:4Foo219FooOverlayClassBaseC
|
|
// CHECK1: FooOverlayClassBase.Type
|
|
|
|
// RUN: %sourcekitd-test -req=interface-gen %S/Inputs/UnresolvedExtension.swift -- %S/Inputs/UnresolvedExtension.swift | %FileCheck -check-prefix=CHECK2 %s
|
|
// CHECK2: extension ET
|
|
|
|
// RUN: %sourcekitd-test -req=interface-gen %S/Inputs/Foo3.swift -- %S/Inputs/Foo3.swift | %FileCheck -check-prefix=CHECK3 %s
|
|
// CHECK3: public class C {
|