assert-panic
This library provides a macro that asserts that a panic happens, and optionally what (kind of) panic happens.
The simplest version gives you the panic as boxed Any
.
Example
# use Any;
use assert_panic;
let _: =
assert_panic!;
assert_panic!;
assert_panic!;
assert_panic!;
assert_panic!;
assert_panic!;
assert_panic!;
Versioning
assert-panic
strictly follows Semantic Versioning 2.0.0 with the following exceptions:
- The minor version will not reset to 0 on major version changes.
Consider it the global feature level. - The patch version will not reset to 0 on major or minor version changes.
Consider it the global patch level. - Panic messages originating from
assert-panic
are considered an implementation detail.
Please only evaluate panic values you have direct control over.