Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to stub a objc method with a error:(NSError **)errPtr parameter? #493

Open
ziilive opened this issue May 24, 2024 · 1 comment
Open

Comments

@ziilive
Copy link

ziilive commented May 24, 2024

Objc method declare like:

- (BOOL)connectToHost:(NSString*)host onPort:(uint16_t)port error:(NSError **)errPtr;

Bridged to swift:

func connectTo(host: on port:) throws -> Bool

So how do stub a method like this?

@MatyasKriz
Copy link
Collaborator

Hey @ziilive, unfortunately I'm not really well-versed in the Obj-C mocking part, so I can't help here, perhaps someone from the community might know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants