diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-17 19:31:00 +0100 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-02-17 19:31:00 +0100 |
| commit | 4f59a77c51c52d20d09a3cf5319f01db3c9138ec (patch) | |
| tree | 58f1e6cd635450d45ad6f2b03a9f3bdd500ef71d | |
| parent | 4ce5e261b31566f06b457f402488b6a26baa7fd1 (diff) | |
| parent | d5212b4b7d83b6bf31bc2e49a696cbd7c83232bd (diff) | |
| download | redot-engine-4f59a77c51c52d20d09a3cf5319f01db3c9138ec.tar.gz | |
Merge pull request #88449 from AThousandShips/test_tool_fix
[Tests] Fix test regression without editor
| -rw-r--r-- | tests/test_main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 7f49805274..58117d6b68 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -30,8 +30,11 @@ #include "test_main.h" +#ifdef TOOLS_ENABLED #include "editor/editor_paths.h" #include "editor/editor_settings.h" +#endif // TOOLS_ENABLED + #include "tests/core/config/test_project_settings.h" #include "tests/core/input/test_input_event.h" #include "tests/core/input/test_input_event_key.h" @@ -270,11 +273,13 @@ struct GodotTestCaseListener : public doctest::IReporter { SceneTree::get_singleton()->get_root()->set_embedding_subwindows(true); } +#ifdef TOOLS_ENABLED if (name.find("[Editor]") != -1) { Engine::get_singleton()->set_editor_hint(true); EditorPaths::create(); EditorSettings::create(); } +#endif // TOOLS_ENABLED return; } @@ -298,9 +303,11 @@ struct GodotTestCaseListener : public doctest::IReporter { } void test_case_end(const doctest::CurrentTestCaseStats &) override { +#ifdef TOOLS_ENABLED if (EditorSettings::get_singleton()) { EditorSettings::destroy(); } +#endif // TOOLS_ENABLED Engine::get_singleton()->set_editor_hint(false); |
