Is your feature request related to a problem? Please describe.
A spy is currently unable to be generated for init requirements. Any protocol with an init requirement will not synthesize correctly.
Describe the solution you'd like
protocol Thing {
init(time: Double)
}
Should generate:
class ThingSpy: Thing {
init() {}
var initTimeReceivedTime: Double!
required init(time: Double) {
initTimeReceivedTime = time
}
}
Describe alternatives you've considered
N/A
Additional context
- A default
init without any parameters should still be generated.
- Only 1 value needs to be captured from the init requirements, because the object can only be created once.
init protocol requirements must be prefixed with the required keyword.
Is your feature request related to a problem? Please describe.
A spy is currently unable to be generated for
initrequirements. Any protocol with aninitrequirement will not synthesize correctly.Describe the solution you'd like
Should generate:
Describe alternatives you've considered
N/A
Additional context
initwithout any parameters should still be generated.initprotocol requirements must be prefixed with therequiredkeyword.