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

Feature request: predicate on CHECK_THROWS #846

Open
netheril96 opened this issue Mar 8, 2024 · 0 comments
Open

Feature request: predicate on CHECK_THROWS #846

netheril96 opened this issue Mar 8, 2024 · 0 comments

Comments

@netheril96
Copy link

Description

The current assertion macros can only assert on either exception type or exception message. However, in my use case, I need to assert that it has a specific exception code.

Can we have

  • Either an assertion macro that returns the captured exception
  • Or an assertion macro accepting a lambda as a predicate to further distinguish an expected exception from an unexpected one
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

1 participant