From 431ce35057f47ee6097f73fcf8758f51586470fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Thu, 15 Feb 2024 17:42:12 +0100 Subject: [PATCH] Fix building of tests on iOS ... Macros tests don't run there. --- Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift b/Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift index a2f0e16..972ada8 100644 --- a/Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift +++ b/Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift @@ -371,6 +371,7 @@ final class ModelMacroTests: XCTestCase { // MARK: - Helper +#if canImport(ManagedModelMacros) func parseAndExplode(_ source: String) -> Syntax { // Parse the original source file. let sourceFile : SourceFileSyntax = Parser.parse(source: source) @@ -393,6 +394,7 @@ final class ModelMacroTests: XCTestCase { return explodedFile } +#endif // canImport(ManagedModelMacros) // Note: This does not fail the test, but it does fail the compiler. // https://github.com/Data-swift/ManagedModels/issues/18