Commit 7befc5b1 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Tests: Ensure we're using a clean test environment

parent ffa40a28
......@@ -34,6 +34,7 @@ list(APPEND TEST_SRCS
Files.cpp
Labels.cpp
Albums.cpp
Tests.cpp
)
add_executable(unittest ${TEST_SRCS})
......
#include "gtest/gtest.h"
class TestEnv : public ::testing::Environment
{
public:
virtual void SetUp()
{
// Always clean the DB in case a previous test crashed
unlink("test.db");
}
};
::testing::Environment* const env = ::testing::AddGlobalTestEnvironment(new TestEnv);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment