Expand description
This is the core of the asserting crate.
Structs§
- Assert
Failure - An error describing a failed assertion.
- Code
panic - Wrapper type that holds a closure as code snippet.
- Collect
Failures FailingStrategythat collects the failures from failing assertions.- Diff
Format - Definition of format properties for highlighting differences between two values.
- 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.
- Owned
Location - An owned location in the source code respectively test code.
- Panic
OnFail FailingStrategythat 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.
- Failing
Strategy - Defines the behavior when an assertion fails.
Functions§
- assert_
that - Starts an assertion for the given subject or expression in the
PanicOnFailmode. - assert_
that_ code panic - Starts an assertion for some piece of code in the
PanicOnFailmode. - verify_
that - Starts an assertion for the given subject or expression in the
CollectFailuresmode. - verify_
that_ code panic - Starts an assertion for some piece of code in the
CollectFailuresmode.