diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-29 14:02:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 14:02:21 +0200 |
commit | e60086f98b07365d6174677df84c9a22bfb56d15 (patch) | |
tree | b1ff19a2fda6a735d883340a389d85e03c6febf5 /tests | |
parent | 0024ba8daddbc7d49458d438ccf578242d900e57 (diff) | |
parent | 6320a0fc18fa84363494df9013b65011a3018a62 (diff) |
Merge pull request #64119 from YuriSizov/theme-init-database
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 3d186711cb..a30d11342a 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -99,7 +99,7 @@ #include "tests/test_macros.h" -#include "scene/resources/default_theme/default_theme.h" +#include "scene/theme/theme_db.h" #include "servers/navigation_server_2d.h" #include "servers/navigation_server_3d.h" #include "servers/physics_server_2d.h" @@ -179,6 +179,7 @@ struct GodotTestCaseListener : public doctest::IReporter { PhysicsServer2D *physics_server_2d = nullptr; NavigationServer3D *navigation_server_3d = nullptr; NavigationServer2D *navigation_server_2d = nullptr; + ThemeDB *theme_db = nullptr; void test_case_start(const doctest::TestCaseData &p_in) override { SignalWatcher::get_singleton()->_clear_signals(); @@ -217,7 +218,8 @@ struct GodotTestCaseListener : public doctest::IReporter { memnew(InputMap); InputMap::get_singleton()->load_default(); - make_default_theme(1.0, Ref<Font>()); + theme_db = memnew(ThemeDB); + theme_db->initialize_theme_noproject(); memnew(SceneTree); SceneTree::get_singleton()->initialize(); @@ -247,7 +249,10 @@ struct GodotTestCaseListener : public doctest::IReporter { memdelete(SceneTree::get_singleton()); } - clear_default_theme(); + if (theme_db) { + memdelete(theme_db); + theme_db = nullptr; + } if (navigation_server_3d) { memdelete(navigation_server_3d); |