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.
28 lines
1.1 KiB
Swift
28 lines
1.1 KiB
Swift
// RUN: %sourcekitd-test -req=index %s -- -Xfrontend -serialize-diagnostics-path -Xfrontend %t.dia %s | %sed_clean > %t.response
|
|
// RUN: diff -u %s.response %t.response
|
|
|
|
// This test verifies that, when Objective-C interop is enabled, all "test
|
|
// candidate" methods are surfaced regardless of visibility. (On Linux, only
|
|
// internal or public methods are considered "test candidates".)
|
|
// REQUIRES: objc_interop
|
|
|
|
func test_takesNoParams_andReturnsVoid_butIsNotAnInstanceMethod() {}
|
|
|
|
struct MyStruct {
|
|
func test_startsWithTest_takesNoParams_returnsVoid_butIsDefinedOnAStruct() {}
|
|
}
|
|
class XCTestCase {}
|
|
private class MyPrivateClass : XCTestCase {
|
|
func test_startsWithTest_takesNoParams_returnsVoid_andIsPrivate() {}
|
|
}
|
|
|
|
public class MyClass : XCTestCase {
|
|
func doesNotStartWithTest() {}
|
|
func test_startsWithTest_butTakesAParam(param: Int) {}
|
|
func test_startsWithTest_andTakesNoParams_butReturnsNonVoid() -> Int {}
|
|
private func test_startsWithTest_takesNoParams_returnsVoid_andIsPrivate() {}
|
|
func test_startsWithTest_takesNoParams_returnsVoid() {}
|
|
func test_startsWithTest_takesNoParams_returnsVoid_andThrows() throws {}
|
|
}
|
|
|