Module tests

Source
Expand description

The storage::tests module contains test vectors that implementations of the Storage trait should pass. These can be called with a Storage implementation as part of a test.

These are public so that implementors of the Storage trait (in other libraries or binaries) can call them.

Functionsยง

do_ensure_no_error_remove_nonexistent_key
Test that a remove of a non-existent key causes no errors
do_return_none_for_wrong_value_type
Test that the implementation returns None for a mismatch between value types
do_test_set_get_remove_bool
Test that the implementation stores, retrieves, and clears bool values correctly.
do_test_set_get_remove_int
Test that the implementation stores, retrieves, and clears int values correctly.
do_test_set_get_remove_string
These are tests for verifying that a given Storage implementation acts as expected. Test that the implementation stores, retrieves, and clears String values correctly.
do_test_set_get_remove_time
Test that the implementation stores, retrieves, and clears bool values correctly.
do_test_set_option_int
Test that the implementation stores, retrieves, and clears Option values correctly.