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

Add non-fatal assertions #9

Open
bitwizeshift opened this issue Mar 16, 2023 · 0 comments
Open

Add non-fatal assertions #9

bitwizeshift opened this issue Mar 16, 2023 · 0 comments
Labels
✨ Feature New feature being added

Comments

@bitwizeshift
Copy link
Owner

As an extension to #7, it can be useful in testing to provide non-fatal assertions for tests, which can allow the code to progress after failure.

The current proposed implementation is:

  • Extend __Context to support storing assertion errors
  • Add a proc-macro that writes to the implicit __context for failures (this is necessary since declarative macros will fail due to __context not being visible in the current scope)
  • Create declarative macros that call the proc-macro to trigger errors

There should also be considerable code-sharing between #7 and this, since anything we want asserts of, we should also offer expects.

@bitwizeshift bitwizeshift added the ✨ Feature New feature being added label Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature New feature being added
Projects
None yet
Development

No branches or pull requests

1 participant