Skip to content

Commit 38669b6

Browse files
authored
Merge pull request #6 from owenv/owenv/static-linux-build
Fix build when using the static linux SDK
2 parents 27c380f + 0c6b964 commit 38669b6

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

Sources/ToolsProtocolsTestSupport/Assertions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if canImport(XCTest)
1314
package import XCTest
1415

1516
/// Same as `XCTAssertNoThrow` but executes the trailing closure.
@@ -181,3 +182,4 @@ package nonisolated func fulfillmentOfOrThrow(
181182
throw ExpectationNotFulfilledError(expectations: expectations)
182183
}
183184
}
185+
#endif

Sources/ToolsProtocolsTestSupport/CheckCoding.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if canImport(XCTest)
1314
import Foundation
1415
import XCTest
1516

@@ -112,3 +113,4 @@ package func checkCoding<T: Codable>(
112113

113114
body(decodedValue)
114115
}
116+
#endif

Sources/ToolsProtocolsTestSupport/PerfTestCase.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if canImport(XCTest)
1314
public import XCTest
1415

1516
/// Base class for a performance test case in SourceKit-LSP.
@@ -52,3 +53,4 @@ open class PerfTestCase: XCTestCase {
5253
#endif
5354

5455
}
56+
#endif

Sources/ToolsProtocolsTestSupport/RepeatUntilExpectedResult.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if canImport(XCTest)
1314
import SKLogging
1415
@_spi(SourceKitLSP) import ToolsProtocolsSwiftExtensions
1516
import XCTest
@@ -35,3 +36,4 @@ package func repeatUntilExpectedResult(
3536
}
3637
XCTFail("Failed to get expected result", file: file, line: line)
3738
}
39+
#endif

Sources/ToolsProtocolsTestSupport/TestJSONRPCConnection.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#if canImport(XCTest)
1314
public import LanguageServerProtocol
1415
package import LanguageServerProtocolTransport
1516
@_spi(SourceKitLSP) import ToolsProtocolsSwiftExtensions
@@ -233,3 +234,4 @@ package struct EchoNotification: NotificationType {
233234
self.string = string
234235
}
235236
}
237+
#endif

0 commit comments

Comments
 (0)