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 } + """