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

Support of expectations of Swift errors throwing #136

Closed
yariksmirnov opened this issue Jun 15, 2015 · 3 comments
Closed

Support of expectations of Swift errors throwing #136

yariksmirnov opened this issue Jun 15, 2015 · 3 comments

Comments

@yariksmirnov
Copy link

Would be great to be able to expect Swift native ErrorType throwing.

@modocache
Copy link
Member

@yariksmirnov Great idea! Could you give an example of what you'd like to see?

@yariksmirnov
Copy link
Author

I've been thinking for sometime. I actually don't know how to implement such feature.
I believe it should look something like this:

In case we test function which accept args.

expect {
    testingFuncWhichThrows(arg1, arg2)
}.toThrow()

And more convenient variant for case when func takes no args.

expect(testingFuncWhichThrows).toThrow()

@jeffh
Copy link
Member

jeffh commented Jul 27, 2015

Closed, this has been merged into swift-2.0 / 2.0.0-rc.2.

@jeffh jeffh closed this as completed Jul 27, 2015
phatblat pushed a commit to phatblat/Nimble that referenced this issue May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants