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.
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:
__Context
to support storing assertion errors__context
for failures (this is necessary since declarative macros will fail due to__context
not being visible in the current scope)There should also be considerable code-sharing between #7 and this, since anything we want
assert
s of, we should also offerexpect
s.