diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-07 17:23:08 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-07 18:04:47 +0300 |
commit | 1de922f88c91402b3f8083431e11401892485b4d (patch) | |
tree | 34c1621a56e8e090d6428c306c9c240d1d97faf7 | |
parent | 1b79b4dd30b6900717458707b0ddd656b384413f (diff) |
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.
-rw-r--r-- | source/blender/blenkernel/intern/asset_catalog_test.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/asset_catalog_test.cc b/source/blender/blenkernel/intern/asset_catalog_test.cc index fb471a8ee7b..90488611946 100644 --- a/source/blender/blenkernel/intern/asset_catalog_test.cc +++ b/source/blender/blenkernel/intern/asset_catalog_test.cc @@ -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) |