Module spec

Source
Expand description

This is the core of the asserting crate.

Structs§

AssertFailure
An error describing a failed assertion.
Code
Wrapper type that holds a closure as code snippet.
CollectFailures
FailingStrategy that collects the failures from failing assertions.
Expression
A textual representation of the expression or subject that is being asserted.
Location
The location of an assertion in the source code respectively test code.
OwnedLocation
An owned location in the source code respectively test code.
PanicOnFail
FailingStrategy that panics when an assertion fails.
Spec
Data of an actual assertion.
Unknown
Used with generic types in expectations where the concrete type is not relevant for the failure message.

Traits§

Expectation
An expectation defines a test for a property of the asserted subject.
FailingStrategy
Defines the behavior when an assertion fails.

Functions§

assert_that
Starts an assertion for the given subject or expression in the PanicOnFail mode.
assert_that_code
Starts an assertion for some piece of code in the PanicOnFail mode.
verify_that
Starts an assertion for the given subject or expression in the CollectFailures mode.
verify_that_code
Starts an assertion for some piece of code in the CollectFailures mode.