Crate easy_assert

Source
Expand description

§Description:

easy-assert crate, which will help you to create more readable tests For now it can help you assert simple numeric values, strings, vecs and you can do your own custom assertions Everything divided by modules. Check each module for usage example.

Modules§

bool_assertions
Usage
custom_assertions
Usage
list_assertions
Usage
num_assertions
Usage
option_assertions
Usage
string_assertions
Usage

Structs§

Actual
Struct to wrap your value in order to have custom description if needed and never think about where to put actual or expected value.

Functions§

actual
Creates a new Actual wrapper. Value should implement Display trait.
actual_vec
Convert vec with values into vec of Actual wrappers. Value should implement Display trait.
actual_vec_with
Convert vec with values into vec of Actual wrappers. You should provide your own function to represent value as String.
actual_with
Creates a new Actual wrapper. You should provide your own function to represent value as String. Can be used if you need custom description or value doesn’t implement Display trait
expected
Creates a new Expected wrapper. Value should implement Display trait.
expected_vec
Convert vec with values into vec of Expected wrappers. Value should implement Display trait.
expected_vec_with
Convert vec with values into vec of Expected wrappers. You should provide your own function to represent value as String.
expected_with
Creates a new Expected wrapper. You should provide your own function to represent value as String. Can be used if you need custom description or value doesn’t implement Display trait

Type Aliases§

Expected