summaryrefslogtreecommitdiff
path: root/main/tests/test_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/tests/test_main.cpp')
-rw-r--r--main/tests/test_main.cpp32
1 files changed, 10 insertions, 22 deletions
diff --git a/main/tests/test_main.cpp b/main/tests/test_main.cpp
index a9a671e2f1..0bb8367240 100644
--- a/main/tests/test_main.cpp
+++ b/main/tests/test_main.cpp
@@ -35,6 +35,7 @@
#ifdef DEBUG_ENABLED
#include "test_astar.h"
+#include "test_class_db.h"
#include "test_gdscript.h"
#include "test_gui.h"
#include "test_math.h"
@@ -47,7 +48,6 @@
#include "test_string.h"
const char **tests_get_names() {
-
static const char *test_names[] = {
"string",
"math",
@@ -55,6 +55,7 @@ const char **tests_get_names() {
"physics_3d",
"render",
"oa_hash_map",
+ "class_db",
"gui",
"shaderlang",
"gd_tokenizer",
@@ -63,104 +64,91 @@ const char **tests_get_names() {
"gd_bytecode",
"ordered_hash_map",
"astar",
- NULL
+ nullptr
};
return test_names;
}
MainLoop *test_main(String p_test, const List<String> &p_args) {
-
if (p_test == "string") {
-
return TestString::test();
}
if (p_test == "math") {
-
return TestMath::test();
}
if (p_test == "physics_2d") {
-
return TestPhysics2D::test();
}
if (p_test == "physics_3d") {
-
return TestPhysics3D::test();
}
if (p_test == "render") {
-
return TestRender::test();
}
if (p_test == "oa_hash_map") {
-
return TestOAHashMap::test();
}
+ if (p_test == "class_db") {
+ return TestClassDB::test();
+ }
+
#ifndef _3D_DISABLED
if (p_test == "gui") {
-
return TestGUI::test();
}
#endif
if (p_test == "shaderlang") {
-
return TestShaderLang::test();
}
if (p_test == "gd_tokenizer") {
-
return TestGDScript::test(TestGDScript::TEST_TOKENIZER);
}
if (p_test == "gd_parser") {
-
return TestGDScript::test(TestGDScript::TEST_PARSER);
}
if (p_test == "gd_compiler") {
-
return TestGDScript::test(TestGDScript::TEST_COMPILER);
}
if (p_test == "gd_bytecode") {
-
return TestGDScript::test(TestGDScript::TEST_BYTECODE);
}
if (p_test == "ordered_hash_map") {
-
return TestOrderedHashMap::test();
}
if (p_test == "astar") {
-
return TestAStar::test();
}
print_line("Unknown test: " + p_test);
- return NULL;
+ return nullptr;
}
#else
const char **tests_get_names() {
-
static const char *test_names[] = {
- NULL
+ nullptr
};
return test_names;
}
MainLoop *test_main(String p_test, const List<String> &p_args) {
-
- return NULL;
+ return nullptr;
}
#endif