diff options
Diffstat (limited to 'tests/test_main.cpp')
-rw-r--r-- | tests/test_main.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/test_main.cpp b/tests/test_main.cpp index 24eb84127b..041231888b 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -44,6 +44,7 @@ #include "tests/core/io/test_file_access.h" #include "tests/core/io/test_http_client.h" #include "tests/core/io/test_image.h" +#include "tests/core/io/test_ip.h" #include "tests/core/io/test_json.h" #include "tests/core/io/test_marshalls.h" #include "tests/core/io/test_pck_packer.h" @@ -85,6 +86,7 @@ #include "tests/core/templates/test_list.h" #include "tests/core/templates/test_local_vector.h" #include "tests/core/templates/test_lru.h" +#include "tests/core/templates/test_oa_hash_map.h" #include "tests/core/templates/test_paged_array.h" #include "tests/core/templates/test_rid.h" #include "tests/core/templates/test_vector.h" @@ -98,9 +100,9 @@ #include "tests/core/variant/test_variant.h" #include "tests/core/variant/test_variant_utility.h" #include "tests/scene/test_animation.h" -#include "tests/scene/test_arraymesh.h" #include "tests/scene/test_audio_stream_wav.h" #include "tests/scene/test_bit_map.h" +#include "tests/scene/test_camera_2d.h" #include "tests/scene/test_code_edit.h" #include "tests/scene/test_color_picker.h" #include "tests/scene/test_control.h" @@ -109,6 +111,7 @@ #include "tests/scene/test_curve_3d.h" #include "tests/scene/test_gradient.h" #include "tests/scene/test_image_texture.h" +#include "tests/scene/test_instance_placeholder.h" #include "tests/scene/test_node.h" #include "tests/scene/test_node_2d.h" #include "tests/scene/test_packed_scene.h" @@ -116,6 +119,7 @@ #include "tests/scene/test_sprite_frames.h" #include "tests/scene/test_text_edit.h" #include "tests/scene/test_theme.h" +#include "tests/scene/test_timer.h" #include "tests/scene/test_viewport.h" #include "tests/scene/test_visual_shader.h" #include "tests/scene/test_window.h" @@ -124,6 +128,7 @@ #include "tests/test_validate_testing.h" #ifndef _3D_DISABLED +#include "tests/scene/test_arraymesh.h" #include "tests/scene/test_camera_3d.h" #include "tests/scene/test_navigation_agent_2d.h" #include "tests/scene/test_navigation_agent_3d.h" @@ -184,7 +189,7 @@ int test_main(int argc, char *argv[]) { } // Doctest runner. doctest::Context test_context; - List<String> test_args; + LocalVector<String> test_args; // Clean arguments of "--test" from the args. for (int x = 0; x < argc; x++) { @@ -197,7 +202,7 @@ int test_main(int argc, char *argv[]) { if (test_args.size() > 0) { // Convert Godot command line arguments back to standard arguments. char **doctest_args = new char *[test_args.size()]; - for (int x = 0; x < test_args.size(); x++) { + for (uint32_t x = 0; x < test_args.size(); x++) { // Operation to convert Godot string to non wchar string. CharString cs = test_args[x].utf8(); const char *str = cs.get_data(); @@ -209,7 +214,7 @@ int test_main(int argc, char *argv[]) { test_context.applyCommandLine(test_args.size(), doctest_args); - for (int x = 0; x < test_args.size(); x++) { + for (uint32_t x = 0; x < test_args.size(); x++) { delete[] doctest_args[x]; } delete[] doctest_args; @@ -238,7 +243,7 @@ struct GodotTestCaseListener : public doctest::IReporter { String name = String(p_in.m_name); String suite_name = String(p_in.m_test_suite); - if (name.find("[SceneTree]") != -1 || name.find("[Editor]") != -1) { + if (name.contains("[SceneTree]") || name.contains("[Editor]")) { memnew(MessageQueue); memnew(Input); @@ -248,7 +253,7 @@ struct GodotTestCaseListener : public doctest::IReporter { OS::get_singleton()->set_has_server_feature_callback(nullptr); for (int i = 0; i < DisplayServer::get_create_function_count(); i++) { if (String("mock") == DisplayServer::get_create_function_name(i)) { - DisplayServer::create(i, "", DisplayServer::WindowMode::WINDOW_MODE_MINIMIZED, DisplayServer::VSyncMode::VSYNC_ENABLED, 0, nullptr, Vector2i(0, 0), DisplayServer::SCREEN_PRIMARY, err); + DisplayServer::create(i, "", DisplayServer::WindowMode::WINDOW_MODE_MINIMIZED, DisplayServer::VSyncMode::VSYNC_ENABLED, 0, nullptr, Vector2i(0, 0), DisplayServer::SCREEN_PRIMARY, DisplayServer::CONTEXT_EDITOR, err); break; } } @@ -287,7 +292,7 @@ struct GodotTestCaseListener : public doctest::IReporter { } #ifdef TOOLS_ENABLED - if (name.find("[Editor]") != -1) { + if (name.contains("[Editor]")) { Engine::get_singleton()->set_editor_hint(true); EditorPaths::create(); EditorSettings::create(); @@ -297,7 +302,7 @@ struct GodotTestCaseListener : public doctest::IReporter { return; } - if (name.find("Audio") != -1) { + if (name.contains("Audio")) { // The last driver index should always be the dummy driver. int dummy_idx = AudioDriverManager::get_driver_count() - 1; AudioDriverManager::initialize(dummy_idx); @@ -307,7 +312,7 @@ struct GodotTestCaseListener : public doctest::IReporter { } #ifndef _3D_DISABLED - if (suite_name.find("[Navigation]") != -1 && navigation_server_2d == nullptr && navigation_server_3d == nullptr) { + if (suite_name.contains("[Navigation]") && navigation_server_2d == nullptr && navigation_server_3d == nullptr) { ERR_PRINT_OFF; navigation_server_3d = NavigationServer3DManager::new_default_server(); navigation_server_2d = NavigationServer2DManager::new_default_server(); |