Browse Source

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.
Stefana-Ioana Dranca 2 years ago
parent
commit
b8ccbf3799

+ 4 - 0
Tests/GRPCCodeGenTests/Internal/Translator/ClientCodeTranslatorSnippetBasedTests.swift

@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#if os(macOS) || os(Linux)  // swift-format doesn't like canImport(Foundation.Process)
+
 import XCTest
 
 @testable import GRPCCodeGen
@@ -540,3 +542,5 @@ final class ClientCodeTranslatorSnippetBasedTests: XCTestCase {
     try XCTAssertEqualWithDiff(contents, expectedSwift)
   }
 }
+
+#endif  // os(macOS) || os(Linux)