From 940f772b6c09d581f6192312e8fa5d7c683effa3 Mon Sep 17 00:00:00 2001 From: Ben Chatelain Date: Wed, 6 May 2020 07:12:50 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A7=20Enable=20test=20discovery=20on?= =?UTF-8?q?=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- Tests/LinuxMain.swift | 8 +------- Tests/WebViewTests/WebViewTests.swift | 4 ---- Tests/WebViewTests/XCTestManifests.swift | 9 --------- 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 Tests/WebViewTests/XCTestManifests.swift diff --git a/Makefile b/Makefile index 5365d82..00f1a27 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ build: copyRunResources swift build $(SWIFTC_FLAGS) $(LINKER_FLAGS) test: build copyTestResources - swift test + swift test --enable-test-discovery copyRunResources: mkdir -p ${RUN_RESOURCES_DIRECTORY} diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 58f0182..c3e2227 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,7 +1 @@ -import XCTest - -import SwiftUI_WebViewTests - -var tests = [XCTestCaseEntry]() -tests += SwiftUI_WebViewTests.allTests() -XCTMain(tests) +fatalError("Running tests like this is unsupported. Run the tests again by using `swift test --enable-test-discovery`") diff --git a/Tests/WebViewTests/WebViewTests.swift b/Tests/WebViewTests/WebViewTests.swift index 0fd2241..1ce0231 100644 --- a/Tests/WebViewTests/WebViewTests.swift +++ b/Tests/WebViewTests/WebViewTests.swift @@ -5,8 +5,4 @@ final class WebViewTests: XCTestCase { func testExample() { XCTAssertNotNil(WebView().webView) } - - static var allTests = [ - ("testExample", testExample), - ] } diff --git a/Tests/WebViewTests/XCTestManifests.swift b/Tests/WebViewTests/XCTestManifests.swift deleted file mode 100644 index 549c231..0000000 --- a/Tests/WebViewTests/XCTestManifests.swift +++ /dev/null @@ -1,9 +0,0 @@ -import XCTest - -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(SWebViewTests.allTests), - ] -} -#endif