Crate galvanic_assert [−] [src]
Galvanic-assert: Matcher-based assertions for easier testing
This crate provides a new assertion macros (assert_that!, expect_that!, get_expectation_for!) based on matching predicates (matchers) to
- make writing asserts easier
- make reading asserts comprehendable
- easily extend the assertion framework
- provide a large list common matchers
- integrate with galvanic-test and galvanic-mock (both still in development ... stay tuned!)
- be used with your favourite test framework
The crate will be part of galvanic---a complete test framework for Rust.
Modules
| matchers |
Macros
| all_of |
Takes a list of matchers for the same type combines them conjunctively. |
| any_of |
Takes a list of matchers for the same type combines them disjunctively. |
| assert_that |
States that the asserted values satisfies the required properties of the supplied |
| expect_that |
States that the asserted values satisfies the required properties of the supplied |
| get_expectation_for |
States that the asserted values satisfies the required properties of the supplied |
| is_variant |
Matches if the asserted value's variant matches the expected variant. |
Structs
| MatchResultBuilder |
A builder for creating |
Enums
| Expectation |
The result of a deferred assertion. |
| MatchResult |
The return type of any |
Traits
| Matcher |
The trait which has to be implemented by all matchers. |