1
1

Cleanup: asset catalog tests, move teardown function

Move `AssetCatalogTest::TearDown` close to the corresponding `SetUp`
function, so that it's easier to find.

No functional changes.
This commit is contained in:
2021-10-07 16:23:08 +02:00
parent 1b79b4dd30
commit 1de922f88c

View File

@@ -91,6 +91,14 @@ class AssetCatalogTest : public testing::Test {
temp_library_path_ = "";
}
void TearDown() override
{
if (!temp_library_path_.empty()) {
BLI_delete(temp_library_path_.c_str(), true, true);
temp_library_path_ = "";
}
}
/* Register a temporary path, which will be removed at the end of the test.
* The returned path ends in a slash. */
CatalogFilePath use_temp_path()
@@ -176,14 +184,6 @@ class AssetCatalogTest : public testing::Test {
i++;
});
}
void TearDown() override
{
if (!temp_library_path_.empty()) {
BLI_delete(temp_library_path_.c_str(), true, true);
temp_library_path_ = "";
}
}
};
TEST_F(AssetCatalogTest, load_single_file)