From a92b467d51237b9cae66ce632302faf3e8c2e318 Mon Sep 17 00:00:00 2001 From: fummicc1 Date: Sun, 1 Dec 2024 12:11:32 +0900 Subject: [PATCH] Fix test fixture --- Tests/TestMacros/FixtureMacro.swift | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Tests/TestMacros/FixtureMacro.swift b/Tests/TestMacros/FixtureMacro.swift index 5a119ea9..356a5769 100644 --- a/Tests/TestMacros/FixtureMacro.swift +++ b/Tests/TestMacros/FixtureMacro.swift @@ -282,21 +282,27 @@ protocol PresentableListener: AnyObject { """ let macroInFuncWithOverloadMock = """ + + + class PresentableListenerMock: PresentableListener { init() { } + #if DEBUG + private(set) var runCallCount = 0 - var runHandler: ((Int) -> ())? - func run(value: Int) { + var runHandler: ((Int) -> ())? + func run(value: Int) { runCallCount += 1 if let runHandler = runHandler { runHandler(value) } } + private(set) var runValueCallCount = 0 - var runValueHandler: ((String) -> ())? - func run(value: String) { + var runValueHandler: ((String) -> ())? + func run(value: String) { runValueCallCount += 1 if let runValueHandler = runValueHandler { runValueHandler(value) @@ -305,4 +311,5 @@ class PresentableListenerMock: PresentableListener { } #endif } + """