Crate assertx

Source

Macros§

assert_contains_exactly
Asserts that both collections contain exactly the same elements found in the same order.
assert_contains_in_order
Asserts that both collections contain exactly the same elements found in the same order.
assert_contains_none
Asserts that the actual collection contains none of the elements in the expected collection
assert_logs_containDeprecated
Deprecated. Please use [assert_logs_contain_in_order] instead
assert_logs_contain_in_order
Asserts that logs contain the expected messages All logging tests need to invoke the logging::setup_logging_test method to capture logs for assertion
assert_logs_contain_none
Asserts that logs contain none of the expected messages All logging tests need to invoke the logging::setup_logging_test method to capture logs for assertion
assert_same_variant
Asserts that actual variant is the same as the expected variant, regardless of the value of their fields. The enum is required to implement the Debug trait.

Functions§

setup_logging_test
Sets up the test logger and registers it with the log library. Initialisation is lazy and will not be repeated in the same execution context. This may lead to unexpected behaviour as the test logger is not reset between tests. This is a known issue and will be fixed in a future release (Pull requests welcome!)