From 1de922f88c91402b3f8083431e11401892485b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 7 Oct 2021 16:23:08 +0200 Subject: 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. --- source/blender/blenkernel/intern/asset_catalog_test.cc | 16 ++++++++-------- 1 file 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) -- cgit v1.2.3