simplify test use case
This commit is contained in:
parent
1778f48bc6
commit
59e7634712
1 changed files with 2 additions and 12 deletions
|
@ -8,18 +8,8 @@
|
|||
|
||||
BOOST_AUTO_TEST_CASE(create_database)
|
||||
{
|
||||
std::filesystem::path testPath = std::filesystem::temp_directory_path() / "kima2test.db";
|
||||
if (std::filesystem::exists(testPath)) {
|
||||
std::filesystem::remove(testPath);
|
||||
}
|
||||
|
||||
std::string filename = testPath.generic_string();
|
||||
Database db(":memory:");
|
||||
BOOST_CHECK_NO_THROW(db.init());
|
||||
|
||||
Database db(filename);
|
||||
db.init();
|
||||
|
||||
BOOST_TEST(std::filesystem::exists(testPath) == true);
|
||||
if (std::filesystem::exists(testPath)) {
|
||||
std::filesystem::remove(testPath);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue