You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using verify to check if a mocked function has been called, if such function accepts a NSUserActivity as a parameter passed , and it has been passed as any(), the unit tests project crashes raising on the current latest version (0.19.2) a Thread 1: EXC_BAD_ACCESS.
On 0.18.x the error is also present, but is handled so that the project does not crash resulting into a failing test with a provided description and highlighting the specific line where the exception is raised: -[NSProxy methodSignatureForSelector:] called! (NSInvalidArgumentException)
On the 0.17.0 version the tests proceed without any issue.
Example
Protocol Function example: func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
Code that raises the exception/error: verify(mockBranchClient.scene(any(), continue: any())).wasNeverCalled() verify(mockBranchClient.scene(any(), continue: any())).wasCalled()
Expected Behavior
The test should either succeed or fail by check if the verified function has been called or not with the passed parameters.
Environment
Xcode 13.2 Swift 5.5.2
Mockingbird set up using pods and using the CLI bundled with it.
Using Quick and Nimble
The text was updated successfully, but these errors were encountered:
New Issue Checklist
Overview
When using
verify
to check if a mocked function has been called, if such function accepts aNSUserActivity
as a parameter passed , and it has been passed asany()
, the unit tests project crashes raising on the current latest version (0.19.2) aThread 1: EXC_BAD_ACCESS
.On 0.18.x the error is also present, but is handled so that the project does not crash resulting into a failing test with a provided description and highlighting the specific line where the exception is raised:
-[NSProxy methodSignatureForSelector:] called! (NSInvalidArgumentException)
On the 0.17.0 version the tests proceed without any issue.
Example
Protocol Function example:
func scene(_ scene: UIScene, continue userActivity: NSUserActivity)
Code that raises the exception/error:
verify(mockBranchClient.scene(any(), continue: any())).wasNeverCalled()
verify(mockBranchClient.scene(any(), continue: any())).wasCalled()
Expected Behavior
The test should either succeed or fail by check if the verified function has been called or not with the passed parameters.
Environment
The text was updated successfully, but these errors were encountered: