diff options
Diffstat (limited to 'libs/libmdbx/src/test/test.cc')
-rw-r--r-- | libs/libmdbx/src/test/test.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/libmdbx/src/test/test.cc b/libs/libmdbx/src/test/test.cc index c28bbd221e..b9663c2a09 100644 --- a/libs/libmdbx/src/test/test.cc +++ b/libs/libmdbx/src/test/test.cc @@ -410,6 +410,16 @@ void testcase::db_table_close(MDBX_dbi handle) { log_trace("<< testcase::db_table_close"); } +void testcase::checkdata(const char *step, MDBX_dbi handle, MDBX_val key2check, + MDBX_val expected_valued) { + MDBX_val actual_value = expected_valued; + int rc = mdbx_get2(txn_guard.get(), handle, &key2check, &actual_value); + if (unlikely(rc != MDBX_SUCCESS)) + failure_perror(step, rc); + if (!is_samedata(&actual_value, &expected_valued)) + failure("%s data mismatch", step); +} + //----------------------------------------------------------------------------- bool test_execute(const actor_config &config) { |