From 3644124a36784e3cda184bde034987e1f2b73edd Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 20 Jan 2019 17:39:07 -0500 Subject: [PATCH] Fix testing on tvOS/iOS --- Tests/PathTests/TemporaryDirectory.swift | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Tests/PathTests/TemporaryDirectory.swift b/Tests/PathTests/TemporaryDirectory.swift index 1e1577f..1b9261d 100644 --- a/Tests/PathTests/TemporaryDirectory.swift +++ b/Tests/PathTests/TemporaryDirectory.swift @@ -52,3 +52,20 @@ extension Path { return try body(tmp.path) } } + + +#if !os(macOS) && !os(Linux) +import XCTest + +// SwiftPM generates code that is improperly escaped thus we require this to +// compile on iOS & tvOS. +public typealias XCTestCaseEntry = (testCaseClass: XCTestCase.Type, allTests: [(String, (XCTestCase) throws -> Void)]) + +public func testCase(_ allTests: [(String, (T) -> () throws -> Void)]) -> XCTestCaseEntry { + fatalError() +} + +public func testCase(_ allTests: [(String, (T) -> () -> Void)]) -> XCTestCaseEntry { + fatalError() +} +#endif