Crate bitcoinleveldb_test

Source

Structs§

ErrorEnv
| A wrapper that allows injection of errors. |
Test
Tester
| An instance of Tester is allocated to | hold temporary state during the execution | of an assertion. |

Functions§

compressible_string
| Store in dst a string of length “len” that | will compress to “Ncompressed_fraction” bytes | and return a Slice that references the | generated data.
random_key
| Return a random key with the specified | length that may contain interesting | characters (e.g. \x00, \xff, etc.). |
random_seed
| Return a randomization seed for this run. | Typically returns the same number on repeated | invocations of this binary, but automated runs | may be able to vary the seed.
random_string
| Store in *dst a random string of length | “len” and return a Slice that references | the generated data. |
register_test
| Register the specified test. Typically | not used directly, but invoked via the | macro expansion of TEST. |
run_all_tests
| Run some of the tests registered by the TEST() | macro. If the environment variable | “LEVELDB_TESTS” is not set, runs all tests. | | Otherwise, runs only the tests whose name | contains the value of “LEVELDB_TESTS” as | a substring. E.g., suppose the tests are: | | TEST(Foo, Hello) { … } | TEST(Foo, World) { … } | | LEVELDB_TESTS=Hello will run the first test | LEVELDB_TESTS=o will run both tests | LEVELDB_TESTS=Junk will run no tests | | Returns 0 if all tests pass. | | Dies or returns a non-zero value if some test | fails.
tmp_dir
| Return the directory to use for temporary | storage. |