From c83369f34761e7a053d62312bd07fe5b3db3a519 Mon Sep 17 00:00:00 2001 From: blue Date: Sun, 26 Mar 2023 21:42:52 +0300 Subject: [PATCH] fixed tests build --- test/CMakeLists.txt | 3 ++- test/basic.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1270e31..5f1a0e0 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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) diff --git a/test/basic.cpp b/test/basic.cpp index 9c9ad62..509f896 100644 --- a/test/basic.cpp +++ b/test/basic.cpp @@ -10,8 +10,8 @@ class BaseTest : public ::testing::Test { protected: BaseTest(): ::testing::Test(), - t1(db->getTable("table1")), - t2(db->getTable("table2")), + t1(db->getStorage("table1")), + t2(db->getStorage("table2")), c1(db->getCache("cache1")) {} ~BaseTest() {} @@ -19,8 +19,8 @@ protected: static void SetUpTestSuite() { if (db == nullptr) { db = new LMDBAL::Base("testBase"); - db->addTable("table1"); - db->addTable("table2"); + db->addStorage("table1"); + db->addStorage("table2"); db->addCache("cache1"); } } @@ -152,8 +152,8 @@ TEST_F(BaseTest, Persistence) { delete db; db = new LMDBAL::Base("testBase"); - t1 = db->addTable("table1"); - t2 = db->addTable("table2"); + t1 = db->addStorage("table1"); + t2 = db->addStorage("table2"); c1 = db->addCache("cache1"); db->open();