kima2/test/test_database.cpp

16 lines
No EOL
398 B
C++

#define BOOST_TEST_MODULE database
#include "../src/core/database.h"
#include <filesystem>
#include <boost/test/included/unit_test.hpp>
//using namespace boost::unit_test;
BOOST_AUTO_TEST_CASE( create_database ) {
std::filesystem::path testPath = std::filesystem::temp_directory_path() / "test.db";
Database db(testPath.c_str());
db.init();
std::filesystem::remove(testPath);
}