Skip to content

Commit b8ccbf3

Browse files
Add missing compiler directive to ClientCodeTranslatorSnippetBasedTests (#1758)
Motivation: A missing compiler directive to avoid compiling the snippet-based tests in non-macOS/Linux platforms was causing the build to fail on iOS/tvOS/watchOS. Modifications: Add the compiler directive. Result: Builds won't fail again in iOS/tvOS/watchOS.
1 parent da5a236 commit b8ccbf3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/GRPCCodeGenTests/Internal/Translator/ClientCodeTranslatorSnippetBasedTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17+
#if os(macOS) || os(Linux) // swift-format doesn't like canImport(Foundation.Process)
18+
1719
import XCTest
1820

1921
@testable import GRPCCodeGen
@@ -540,3 +542,5 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
540542
try XCTAssertEqualWithDiff(contents, expectedSwift)
541543
}
542544
}
545+
546+
#endif // os(macOS) || os(Linux)

0 commit comments

Comments
 (0)