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