Skip to content

Commit d1b0845

Browse files
author
Seppo Takalo
committed
Add TDBStore::reset() to write-once test, just to make sure it is in right condition
1 parent 0487c70 commit d1b0845

File tree

1 file changed

+5
-1
lines changed
  • features/storage/TESTS/kvstore/general_tests_phase_1

1 file changed

+5
-1
lines changed

features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,13 @@ static void set_write_once_flag_try_set_twice()
292292
//set key "write once" and try to remove it
293293
static void set_write_once_flag_try_remove()
294294
{
295+
int res;
295296
TEST_SKIP_UNLESS(kvstore != NULL);
296297

297-
int res = kvstore->set(key, data, data_size, KVStore::WRITE_ONCE_FLAG);
298+
res = kvstore->reset();
299+
TEST_ASSERT_EQUAL_ERROR_CODE(MBED_SUCCESS, res);
300+
301+
res = kvstore->set(key, data, data_size, KVStore::WRITE_ONCE_FLAG);
298302
TEST_ASSERT_EQUAL_ERROR_CODE(MBED_SUCCESS, res);
299303

300304
res = kvstore->remove(key);

0 commit comments

Comments
 (0)