Older/UnitTest/main.cpp

16 lines
614 B
C++
Raw Normal View History

2023-12-30 01:19:36 +08:00
#define BOOST_TEST_MODULE OlderTest
#include "boost/test/included/unit_test.hpp"
2024-11-27 19:23:06 +08:00
#include <filesystem>
#include "Database/Session.h"
2024-11-28 19:34:24 +08:00
constexpr auto databasePath = "build/unit_test_database.sqlite";
2024-11-27 19:23:06 +08:00
int main(int argc, char *argv[]) {
if (std::filesystem::exists(databasePath)) {
std::filesystem::remove(databasePath);
}
Database::initialize(databasePath);
extern ::boost::unit_test::test_suite *init_unit_test_suite(int argc, char *argv[]);
boost::unit_test::init_unit_test_func init_func = &init_unit_test_suite;
return ::boost::unit_test::unit_test_main(init_func, argc, argv);
}