diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-10-25 15:21:35 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-10-25 15:21:43 +0300 |
commit | cdcca917cfa4df1bd8c3a31831bb460cc3e0f604 (patch) | |
tree | aea90f1bdc413be25484938abd78c2edd1e498fc /source | |
parent | 4100a79219e7f7c474046806db3e156be34a1011 (diff) |
Tests: assets, add BKE callback init/finalize to test setup/teardown
Add calls to `BKE_callback_global_init()` and `BKE_callback_global_finalize()`
to ensure unit tests mimick Blender (and don't trip the assertions added
in rBbeea601e7253).
No functional changes to Blender.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/asset_library_service_test.cc | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/asset_library_test.cc | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/asset_library_service_test.cc b/source/blender/blenkernel/intern/asset_library_service_test.cc index 80504bbdc05..e26ae05301e 100644 --- a/source/blender/blenkernel/intern/asset_library_service_test.cc +++ b/source/blender/blenkernel/intern/asset_library_service_test.cc @@ -23,6 +23,7 @@ #include "BLI_path_util.h" #include "BKE_appdir.h" +#include "BKE_callbacks.h" #include "CLG_log.h" @@ -40,10 +41,12 @@ class AssetLibraryServiceTest : public testing::Test { static void SetUpTestSuite() { CLG_init(); + BKE_callback_global_init(); } static void TearDownTestSuite() { CLG_exit(); + BKE_callback_global_finalize(); } void SetUp() override diff --git a/source/blender/blenkernel/intern/asset_library_test.cc b/source/blender/blenkernel/intern/asset_library_test.cc index c6c949a7ec4..702008fed96 100644 --- a/source/blender/blenkernel/intern/asset_library_test.cc +++ b/source/blender/blenkernel/intern/asset_library_test.cc @@ -20,6 +20,7 @@ #include "BKE_appdir.h" #include "BKE_asset_catalog.hh" #include "BKE_asset_library.hh" +#include "BKE_callbacks.h" #include "asset_library_service.hh" @@ -34,10 +35,12 @@ class AssetLibraryTest : public testing::Test { static void SetUpTestSuite() { CLG_init(); + BKE_callback_global_init(); } static void TearDownTestSuite() { CLG_exit(); + BKE_callback_global_finalize(); } void TearDown() override |