forked from blue/lmdbal
fixed tests build
This commit is contained in:
parent
763d956bf8
commit
c83369f347
@ -16,7 +16,8 @@ target_link_libraries(
|
|||||||
runUnitTests
|
runUnitTests
|
||||||
GTest::gtest_main
|
GTest::gtest_main
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
|
Qt${QT_VERSION_MAJOR}::Core
|
||||||
|
lmdb
|
||||||
)
|
)
|
||||||
|
|
||||||
include(GoogleTest)
|
include(GoogleTest)
|
||||||
gtest_discover_tests(runUnitTests)
|
gtest_discover_tests(runUnitTests)
|
||||||
|
@ -10,8 +10,8 @@ class BaseTest : public ::testing::Test {
|
|||||||
protected:
|
protected:
|
||||||
BaseTest():
|
BaseTest():
|
||||||
::testing::Test(),
|
::testing::Test(),
|
||||||
t1(db->getTable<uint32_t, uint32_t>("table1")),
|
t1(db->getStorage<uint32_t, uint32_t>("table1")),
|
||||||
t2(db->getTable<QString, QString>("table2")),
|
t2(db->getStorage<QString, QString>("table2")),
|
||||||
c1(db->getCache<int8_t, std::string>("cache1")) {}
|
c1(db->getCache<int8_t, std::string>("cache1")) {}
|
||||||
|
|
||||||
~BaseTest() {}
|
~BaseTest() {}
|
||||||
@ -19,8 +19,8 @@ protected:
|
|||||||
static void SetUpTestSuite() {
|
static void SetUpTestSuite() {
|
||||||
if (db == nullptr) {
|
if (db == nullptr) {
|
||||||
db = new LMDBAL::Base("testBase");
|
db = new LMDBAL::Base("testBase");
|
||||||
db->addTable<uint32_t, uint32_t>("table1");
|
db->addStorage<uint32_t, uint32_t>("table1");
|
||||||
db->addTable<QString, QString>("table2");
|
db->addStorage<QString, QString>("table2");
|
||||||
db->addCache<int8_t, std::string>("cache1");
|
db->addCache<int8_t, std::string>("cache1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -152,8 +152,8 @@ TEST_F(BaseTest, Persistence) {
|
|||||||
delete db;
|
delete db;
|
||||||
|
|
||||||
db = new LMDBAL::Base("testBase");
|
db = new LMDBAL::Base("testBase");
|
||||||
t1 = db->addTable<uint32_t, uint32_t>("table1");
|
t1 = db->addStorage<uint32_t, uint32_t>("table1");
|
||||||
t2 = db->addTable<QString, QString>("table2");
|
t2 = db->addStorage<QString, QString>("table2");
|
||||||
c1 = db->addCache<int8_t, std::string>("cache1");
|
c1 = db->addCache<int8_t, std::string>("cache1");
|
||||||
db->open();
|
db->open();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user