kima2/test/test_database.cpp

16 lines
398 B
C++
Raw Normal View History

2018-07-09 21:42:38 +02:00
#define BOOST_TEST_MODULE database
#include "../src/core/database.h"
2018-07-10 14:12:37 +02:00
#include <filesystem>
2018-07-09 21:42:38 +02:00
#include <boost/test/included/unit_test.hpp>
//using namespace boost::unit_test;
BOOST_AUTO_TEST_CASE( create_database ) {
2018-07-10 14:12:37 +02:00
std::filesystem::path testPath = std::filesystem::temp_directory_path() / "test.db";
Database db(testPath.c_str());
db.init();
std::filesystem::remove(testPath);
2018-07-09 21:42:38 +02:00
}