Skip to content

Commit

Permalink
Fix test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
fummicc1 committed Dec 1, 2024
1 parent f5a9eac commit a92b467
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Tests/TestMacros/FixtureMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -305,4 +311,5 @@ class PresentableListenerMock: PresentableListener {
}
#endif
}
"""

0 comments on commit a92b467

Please sign in to comment.