Skip to content

Commit

Permalink
Fix building of tests on iOS
Browse files Browse the repository at this point in the history
... Macros tests don't run there.
  • Loading branch information
helje5 committed Feb 15, 2024
1 parent 7b8fe9a commit 431ce35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/ManagedModelMacrosTests/ManagedModelMacrosTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 431ce35

Please sign in to comment.