Skip to content

Commit 069ccc0

Browse files
committed
Fix building of tests on iOS
... Macros tests don't run there. (cherry picked from commit 431ce35)
1 parent 4432f00 commit 069ccc0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift

+2
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ final class ModelMacroTests: XCTestCase {
371371

372372
// MARK: - Helper
373373

374+
#if canImport(ManagedModelMacros)
374375
func parseAndExplode(_ source: String) -> Syntax {
375376
// Parse the original source file.
376377
let sourceFile : SourceFileSyntax = Parser.parse(source: source)
@@ -393,6 +394,7 @@ final class ModelMacroTests: XCTestCase {
393394

394395
return explodedFile
395396
}
397+
#endif // canImport(ManagedModelMacros)
396398

397399
// Note: This does not fail the test, but it does fail the compiler.
398400
// https://github.com/Data-swift/ManagedModels/issues/18

0 commit comments

Comments
 (0)