Skip to content

Commit 15e582f

Browse files
committed
TDBStore unit test: flash simulation no longer required
1 parent 3786d39 commit 15e582f

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

storage/kvstore/tdbstore/tests/UNITTESTS/TDBStore/moduletest.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "gtest/gtest.h"
1818
#include "blockdevice/HeapBlockDevice.h"
19-
#include "blockdevice/FlashSimBlockDevice.h"
2019
#include "tdbstore/TDBStore.h"
2120
#include <stdlib.h>
2221

@@ -28,8 +27,7 @@ using namespace mbed;
2827
class TDBStoreModuleTest : public testing::Test {
2928
protected:
3029
HeapBlockDevice heap{DEVICE_SIZE, BLOCK_SIZE};
31-
FlashSimBlockDevice flash{&heap};
32-
TDBStore tdb{&flash};
30+
TDBStore tdb{&heap};
3331

3432
virtual void SetUp()
3533
{
@@ -63,9 +61,9 @@ TEST_F(TDBStoreModuleTest, set_get)
6361
TEST_F(TDBStoreModuleTest, erased_set_get)
6462
{
6563
EXPECT_EQ(tdb.deinit(), MBED_SUCCESS);
66-
EXPECT_EQ(flash.init(), MBED_SUCCESS);
67-
EXPECT_EQ(flash.erase(0, flash.size()), MBED_SUCCESS);
68-
EXPECT_EQ(flash.deinit(), MBED_SUCCESS);
64+
EXPECT_EQ(heap.init(), MBED_SUCCESS);
65+
EXPECT_EQ(heap.erase(0, heap.size()), MBED_SUCCESS);
66+
EXPECT_EQ(heap.deinit(), MBED_SUCCESS);
6967
EXPECT_EQ(tdb.init(), MBED_SUCCESS);
7068
char buf[100];
7169
size_t size;

storage/kvstore/tdbstore/tests/UNITTESTS/TDBStore/unittest.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ set(unittest-includes ${unittest-includes}
1010
)
1111

1212
set(unittest-sources
13-
../storage/blockdevice/source/FlashSimBlockDevice.cpp
1413
../storage/blockdevice/source/HeapBlockDevice.cpp
1514
../storage/blockdevice/source/BufferedBlockDevice.cpp
1615
../storage/kvstore/tdbstore/source/TDBStore.cpp

0 commit comments

Comments
 (0)