bitwizeshift / bitwizeshift/oxtest

Add non-fatal assertions

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
✨ Feature
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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 `assert`s of, we should also offer `expect`s.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.