From c1a963f836d2d483241267fc5e39ddbd959ecf7c Mon Sep 17 00:00:00 2001 From: Serge Kazakov Date: Wed, 11 Sep 2024 10:27:01 +0100 Subject: [PATCH] Macro test fix (#111) * added conditional import * added conditional import --- Tests/PureduxMacrosTests/InjectedStoreMacroTests.swift | 2 ++ Tests/PureduxTests/TestUtils/TestRootAppStore.swift | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Tests/PureduxMacrosTests/InjectedStoreMacroTests.swift b/Tests/PureduxMacrosTests/InjectedStoreMacroTests.swift index 00b3c32..07e9e24 100644 --- a/Tests/PureduxMacrosTests/InjectedStoreMacroTests.swift +++ b/Tests/PureduxMacrosTests/InjectedStoreMacroTests.swift @@ -5,6 +5,7 @@ // Created by Sergey Kazakov on 25/08/2024. // +#if canImport(PureduxMacros) import SwiftSyntaxMacros import SwiftSyntaxMacrosTestSupport import XCTest @@ -42,3 +43,4 @@ final class InjectedStoreMacroTests: XCTestCase { ) } } +#endif diff --git a/Tests/PureduxTests/TestUtils/TestRootAppStore.swift b/Tests/PureduxTests/TestUtils/TestRootAppStore.swift index 994dd95..e4ee789 100644 --- a/Tests/PureduxTests/TestUtils/TestRootAppStore.swift +++ b/Tests/PureduxTests/TestUtils/TestRootAppStore.swift @@ -4,7 +4,7 @@ // // Created by Sergey Kazakov on 01/09/2024. // - +#if canImport(PureduxMacros) import XCTest @testable import Puredux import SwiftUI @@ -14,3 +14,4 @@ import PureduxMacros extension Injected { @InjectEntry var rootStore = StateStore(0) { state, action in state += action } } +#endif