Older/UnitTest/main.cpp
luocai 889faa4404
All checks were successful
Deploy / Build (push) Successful in 6m54s
use dbo, not test.
2024-11-27 19:23:06 +08:00

16 lines
604 B
C++

#define BOOST_TEST_MODULE OlderTest
#include "boost/test/included/unit_test.hpp"
#include <filesystem>
#include "Database/Session.h"
constexpr auto databasePath = "build/database.sqlite";
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);
}