summaryrefslogtreecommitdiffstats
path: root/tests/test_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_main.cpp')
-rw-r--r--tests/test_main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp
index e029ea7190..291321a45e 100644
--- a/tests/test_main.cpp
+++ b/tests/test_main.cpp
@@ -94,6 +94,8 @@
#include "tests/scene/test_curve.h"
#include "tests/scene/test_curve_2d.h"
#include "tests/scene/test_gradient.h"
+#include "tests/scene/test_navigation_agent_2d.h"
+#include "tests/scene/test_navigation_agent_3d.h"
#include "tests/scene/test_node.h"
#include "tests/scene/test_path_2d.h"
#include "tests/scene/test_path_3d.h"
@@ -103,6 +105,8 @@
#include "tests/scene/test_theme.h"
#include "tests/scene/test_viewport.h"
#include "tests/scene/test_visual_shader.h"
+#include "tests/servers/test_navigation_server_2d.h"
+#include "tests/servers/test_navigation_server_3d.h"
#include "tests/servers/test_text_server.h"
#include "tests/test_validate_testing.h"
@@ -198,6 +202,7 @@ struct GodotTestCaseListener : public doctest::IReporter {
SignalWatcher::get_singleton()->_clear_signals();
String name = String(p_in.m_name);
+ String suite_name = String(p_in.m_test_suite);
if (name.find("[SceneTree]") != -1) {
memnew(MessageQueue);
@@ -248,6 +253,12 @@ struct GodotTestCaseListener : public doctest::IReporter {
audio_server->init();
return;
}
+
+ if (suite_name.find("[Navigation]") != -1 && navigation_server_2d == nullptr && navigation_server_3d == nullptr) {
+ navigation_server_2d = memnew(NavigationServer2D);
+ navigation_server_3d = NavigationServer3DManager::new_default_server();
+ return;
+ }
}
void test_case_end(const doctest::CurrentTestCaseStats &) override {