diff --git a/modules/gltf/tests/test_gltf_extras.h b/modules/gltf/tests/test_gltf_extras.h index 73ef02e9f1b4..9eaf9c112a8f 100644 --- a/modules/gltf/tests/test_gltf_extras.h +++ b/modules/gltf/tests/test_gltf_extras.h @@ -35,187 +35,8 @@ #ifdef TOOLS_ENABLED -#include "core/os/os.h" -#include "editor/import/3d/resource_importer_scene.h" -#include "modules/gltf/editor/editor_scene_importer_gltf.h" #include "modules/gltf/gltf_document.h" -#include "modules/gltf/gltf_state.h" -#include "scene/3d/mesh_instance_3d.h" -#include "scene/3d/skeleton_3d.h" #include "scene/main/window.h" -#include "scene/resources/3d/primitive_meshes.h" -#include "scene/resources/material.h" -#include "scene/resources/packed_scene.h" - -namespace TestGltfExtras { - -static Node *_gltf_export_then_import(Node *p_root, String &p_tempfilebase) { - Ref doc; - doc.instantiate(); - Ref state; - state.instantiate(); - Error err = doc->append_from_scene(p_root, state, EditorSceneFormatImporter::IMPORT_USE_NAMED_SKIN_BINDS); - CHECK_MESSAGE(err == OK, "GLTF state generation failed."); - err = doc->write_to_filesystem(state, p_tempfilebase + ".gltf"); - CHECK_MESSAGE(err == OK, "Writing GLTF to cache dir failed."); - - // Setting up importers. - Ref import_scene = memnew(ResourceImporterScene("PackedScene", true)); - ResourceFormatImporter::get_singleton()->add_importer(import_scene); - Ref import_gltf; - import_gltf.instantiate(); - ResourceImporterScene::add_scene_importer(import_gltf); - - // GTLF importer behaves differently outside of editor, it's too late to modify Engine::get_editor_hint - // as the registration of runtime extensions already happened, so remove them. See modules/gltf/register_types.cpp - GLTFDocument::unregister_all_gltf_document_extensions(); - - HashMap options(20); - options["nodes/root_type"] = ""; - options["nodes/root_name"] = ""; - options["nodes/apply_root_scale"] = true; - options["nodes/root_scale"] = 1.0; - options["meshes/ensure_tangents"] = true; - options["meshes/generate_lods"] = false; - options["meshes/create_shadow_meshes"] = true; - options["meshes/light_baking"] = 1; - options["meshes/lightmap_texel_size"] = 0.2; - options["meshes/force_disable_compression"] = false; - options["skins/use_named_skins"] = true; - options["animation/import"] = true; - options["animation/fps"] = 30; - options["animation/trimming"] = false; - options["animation/remove_immutable_tracks"] = true; - options["import_script/path"] = ""; - options["_subresources"] = Dictionary(); - options["gltf/naming_version"] = 1; - - // Process gltf file, note that this generates `.scn` resource from the 2nd argument. - err = import_scene->import(0, p_tempfilebase + ".gltf", p_tempfilebase, options, nullptr, nullptr, nullptr); - CHECK_MESSAGE(err == OK, "GLTF import failed."); - ResourceImporterScene::remove_scene_importer(import_gltf); - - Ref packed_scene = ResourceLoader::load(p_tempfilebase + ".scn", "", ResourceFormatLoader::CACHE_MODE_REPLACE, &err); - CHECK_MESSAGE(err == OK, "Loading scene failed."); - Node *p_scene = packed_scene->instantiate(); - return p_scene; -} - -TEST_CASE("[SceneTree][Node] GLTF test mesh and material meta export and import") { - // Setup scene. - Ref original_material = memnew(StandardMaterial3D); - original_material->set_albedo(Color(1.0, .0, .0)); - original_material->set_name("material"); - Dictionary material_dict; - material_dict["node_type"] = "material"; - original_material->set_meta("extras", material_dict); - - Ref original_meshdata = memnew(PlaneMesh); - original_meshdata->set_name("planemesh"); - Dictionary meshdata_dict; - meshdata_dict["node_type"] = "planemesh"; - original_meshdata->set_meta("extras", meshdata_dict); - original_meshdata->surface_set_material(0, original_material); - - MeshInstance3D *original_mesh_instance = memnew(MeshInstance3D); - original_mesh_instance->set_mesh(original_meshdata); - original_mesh_instance->set_name("mesh_instance_3d"); - Dictionary mesh_instance_dict; - mesh_instance_dict["node_type"] = "mesh_instance_3d"; - original_mesh_instance->set_meta("extras", mesh_instance_dict); - - Node3D *original = memnew(Node3D); - SceneTree::get_singleton()->get_root()->add_child(original); - original->add_child(original_mesh_instance); - original->set_name("node3d"); - Dictionary node_dict; - node_dict["node_type"] = "node3d"; - original->set_meta("extras", node_dict); - original->set_meta("meta_not_nested_under_extras", "should not propagate"); - - // Convert to GLFT and back. - String tempfile = OS::get_singleton()->get_cache_path().path_join("gltf_extras"); - Node *loaded = _gltf_export_then_import(original, tempfile); - - // Compare the results. - CHECK(loaded->get_name() == "node3d"); - CHECK(Dictionary(loaded->get_meta("extras")).size() == 1); - CHECK(Dictionary(loaded->get_meta("extras"))["node_type"] == "node3d"); - CHECK_FALSE(loaded->has_meta("meta_not_nested_under_extras")); - CHECK_FALSE(Dictionary(loaded->get_meta("extras")).has("meta_not_nested_under_extras")); - - MeshInstance3D *mesh_instance_3d = Object::cast_to(loaded->find_child("mesh_instance_3d", false, true)); - CHECK(mesh_instance_3d->get_name() == "mesh_instance_3d"); - CHECK(Dictionary(mesh_instance_3d->get_meta("extras"))["node_type"] == "mesh_instance_3d"); - - Ref mesh = mesh_instance_3d->get_mesh(); - CHECK(Dictionary(mesh->get_meta("extras"))["node_type"] == "planemesh"); - - Ref material = mesh->surface_get_material(0); - CHECK(material->get_name() == "material"); - CHECK(Dictionary(material->get_meta("extras"))["node_type"] == "material"); - - memdelete(original_mesh_instance); - memdelete(original); - memdelete(loaded); -} - -TEST_CASE("[SceneTree][Node] GLTF test skeleton and bone export and import") { - // Setup scene. - Skeleton3D *skeleton = memnew(Skeleton3D); - skeleton->set_name("skeleton"); - Dictionary skeleton_extras; - skeleton_extras["node_type"] = "skeleton"; - skeleton->set_meta("extras", skeleton_extras); - - skeleton->add_bone("parent"); - skeleton->set_bone_rest(0, Transform3D()); - Dictionary parent_bone_extras; - parent_bone_extras["bone"] = "i_am_parent_bone"; - skeleton->set_bone_meta(0, "extras", parent_bone_extras); - - skeleton->add_bone("child"); - skeleton->set_bone_rest(1, Transform3D()); - skeleton->set_bone_parent(1, 0); - Dictionary child_bone_extras; - child_bone_extras["bone"] = "i_am_child_bone"; - skeleton->set_bone_meta(1, "extras", child_bone_extras); - - // We have to have a mesh to link with skeleton or it will not get imported. - Ref meshdata = memnew(PlaneMesh); - meshdata->set_name("planemesh"); - - MeshInstance3D *mesh = memnew(MeshInstance3D); - mesh->set_mesh(meshdata); - mesh->set_name("mesh_instance_3d"); - - Node3D *scene = memnew(Node3D); - SceneTree::get_singleton()->get_root()->add_child(scene); - scene->add_child(skeleton); - scene->add_child(mesh); - scene->set_name("node3d"); - - // Now that both skeleton and mesh are part of scene, link them. - mesh->set_skeleton_path(mesh->get_path_to(skeleton)); - - // Convert to GLFT and back. - String tempfile = OS::get_singleton()->get_cache_path().path_join("gltf_bone_extras"); - Node *loaded = _gltf_export_then_import(scene, tempfile); - - // Compare the results. - CHECK(loaded->get_name() == "node3d"); - Skeleton3D *result = Object::cast_to(loaded->find_child("Skeleton3D", false, true)); - CHECK(result->get_bone_name(0) == "parent"); - CHECK(Dictionary(result->get_bone_meta(0, "extras"))["bone"] == "i_am_parent_bone"); - CHECK(result->get_bone_name(1) == "child"); - CHECK(Dictionary(result->get_bone_meta(1, "extras"))["bone"] == "i_am_child_bone"); - - memdelete(skeleton); - memdelete(mesh); - memdelete(scene); - memdelete(loaded); -} -} // namespace TestGltfExtras #endif // TOOLS_ENABLED diff --git a/modules/multiplayer/tests/test_scene_multiplayer.h b/modules/multiplayer/tests/test_scene_multiplayer.h index 5e526c9be627..8e557ca37003 100644 --- a/modules/multiplayer/tests/test_scene_multiplayer.h +++ b/modules/multiplayer/tests/test_scene_multiplayer.h @@ -31,254 +31,4 @@ #ifndef TEST_SCENE_MULTIPLAYER_H #define TEST_SCENE_MULTIPLAYER_H -#include "tests/test_macros.h" -#include "tests/test_utils.h" - -#include "../scene_multiplayer.h" - -namespace TestSceneMultiplayer { - -static inline Array build_array() { - return Array(); -} -template -static inline Array build_array(Variant item, Targs... Fargs) { - Array a = build_array(Fargs...); - a.push_front(item); - return a; -} - -TEST_CASE("[Multiplayer][SceneMultiplayer] Defaults") { - Ref scene_multiplayer; - scene_multiplayer.instantiate(); - - REQUIRE(scene_multiplayer->has_multiplayer_peer()); - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - REQUIRE_MESSAGE(Object::cast_to(multiplayer_peer.ptr()) != nullptr, "By default it must be an OfflineMultiplayerPeer instance."); - CHECK_EQ(scene_multiplayer->poll(), Error::OK); - CHECK_EQ(scene_multiplayer->get_unique_id(), MultiplayerPeer::TARGET_PEER_SERVER); - CHECK_EQ(scene_multiplayer->get_peer_ids(), Vector()); - CHECK_EQ(scene_multiplayer->get_remote_sender_id(), 0); - CHECK_EQ(scene_multiplayer->get_root_path(), NodePath()); - CHECK(scene_multiplayer->get_connected_peers().is_empty()); - CHECK_FALSE(scene_multiplayer->is_refusing_new_connections()); - CHECK_FALSE(scene_multiplayer->is_object_decoding_allowed()); - CHECK(scene_multiplayer->is_server_relay_enabled()); - CHECK_EQ(scene_multiplayer->get_max_sync_packet_size(), 1350); - CHECK_EQ(scene_multiplayer->get_max_delta_packet_size(), 65535); - CHECK(scene_multiplayer->is_server()); -} - -TEST_CASE("[Multiplayer][SceneMultiplayer][SceneTree] SceneTree has a OfflineMultiplayerPeer by default") { - Ref scene_multiplayer = SceneTree::get_singleton()->get_multiplayer(); - REQUIRE(scene_multiplayer->has_multiplayer_peer()); - - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - REQUIRE_MESSAGE(Object::cast_to(multiplayer_peer.ptr()) != nullptr, "By default it must be an OfflineMultiplayerPeer instance."); -} - -TEST_CASE("[Multiplayer][SceneMultiplayer][SceneTree] Object configuration add/remove") { - Ref scene_multiplayer; - scene_multiplayer.instantiate(); - - SUBCASE("Returns invalid parameter") { - CHECK_EQ(scene_multiplayer->object_configuration_add(nullptr, "ImInvalid"), Error::ERR_INVALID_PARAMETER); - CHECK_EQ(scene_multiplayer->object_configuration_remove(nullptr, "ImInvalid"), Error::ERR_INVALID_PARAMETER); - - NodePath foo_path("/Foo"); - NodePath bar_path("/Bar"); - CHECK_EQ(scene_multiplayer->object_configuration_add(nullptr, foo_path), Error::OK); - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->object_configuration_remove(nullptr, bar_path), Error::ERR_INVALID_PARAMETER); - ERR_PRINT_ON; - } - - SUBCASE("Sets root path") { - NodePath foo_path("/Foo"); - CHECK_EQ(scene_multiplayer->object_configuration_add(nullptr, foo_path), Error::OK); - - CHECK_EQ(scene_multiplayer->get_root_path(), foo_path); - } - - SUBCASE("Unsets root path") { - NodePath foo_path("/Foo"); - CHECK_EQ(scene_multiplayer->object_configuration_add(nullptr, foo_path), Error::OK); - - CHECK_EQ(scene_multiplayer->object_configuration_remove(nullptr, foo_path), Error::OK); - CHECK_EQ(scene_multiplayer->get_root_path(), NodePath()); - } - - SUBCASE("Add/Remove a MultiplayerSpawner") { - Node2D *node = memnew(Node2D); - MultiplayerSpawner *spawner = memnew(MultiplayerSpawner); - - CHECK_EQ(scene_multiplayer->object_configuration_add(node, spawner), Error::OK); - CHECK_EQ(scene_multiplayer->object_configuration_remove(node, spawner), Error::OK); - - memdelete(spawner); - memdelete(node); - } - - SUBCASE("Add/Remove a MultiplayerSynchronizer") { - Node2D *node = memnew(Node2D); - MultiplayerSynchronizer *synchronizer = memnew(MultiplayerSynchronizer); - - CHECK_EQ(scene_multiplayer->object_configuration_add(node, synchronizer), Error::OK); - CHECK_EQ(scene_multiplayer->object_configuration_remove(node, synchronizer), Error::OK); - - memdelete(synchronizer); - memdelete(node); - } -} - -TEST_CASE("[Multiplayer][SceneMultiplayer] Root Path") { - Ref scene_multiplayer; - scene_multiplayer.instantiate(); - - SUBCASE("Is set") { - NodePath foo_path("/Foo"); - scene_multiplayer->set_root_path(foo_path); - - CHECK_EQ(scene_multiplayer->get_root_path(), foo_path); - } - - SUBCASE("Fails when path is empty") { - ERR_PRINT_OFF; - scene_multiplayer->set_root_path(NodePath()); - ERR_PRINT_ON; - } - - SUBCASE("Fails when path is relative") { - NodePath foo_path("Foo"); - ERR_PRINT_OFF; - scene_multiplayer->set_root_path(foo_path); - ERR_PRINT_ON; - - CHECK_EQ(scene_multiplayer->get_root_path(), NodePath()); - } -} - -// This one could be a dummy callback because the current set of test is not actually testing the full auth flow. -static Variant auth_callback(Variant sv, Variant pvav) { - return Variant(); -} - -TEST_CASE("[Multiplayer][SceneMultiplayer][SceneTree] Send Authentication") { - Ref scene_multiplayer; - scene_multiplayer.instantiate(); - SceneTree::get_singleton()->set_multiplayer(scene_multiplayer); - scene_multiplayer->set_auth_callback(callable_mp_static(auth_callback)); - - SUBCASE("Is properly sent") { - SIGNAL_WATCH(scene_multiplayer.ptr(), "peer_authenticating"); - - // Adding a peer to MultiplayerPeer. - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - int peer_id = 42; - multiplayer_peer->emit_signal(SNAME("peer_connected"), peer_id); - SIGNAL_CHECK("peer_authenticating", build_array(build_array(peer_id))); - - CHECK_EQ(scene_multiplayer->send_auth(peer_id, String("It's me").to_ascii_buffer()), Error::OK); - - Vector expected_peer_ids = { peer_id }; - CHECK_EQ(scene_multiplayer->get_authenticating_peer_ids(), expected_peer_ids); - - SIGNAL_UNWATCH(scene_multiplayer.ptr(), "peer_authenticating"); - } - - SUBCASE("peer_authentication_failed is emitted when a peer is deleted before authentication is completed") { - SIGNAL_WATCH(scene_multiplayer.ptr(), "peer_authentication_failed"); - - // Adding a peer to MultiplayerPeer. - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - int peer_id = 42; - multiplayer_peer->emit_signal(SNAME("peer_connected"), peer_id); - multiplayer_peer->emit_signal(SNAME("peer_disconnected"), peer_id); - SIGNAL_CHECK("peer_authentication_failed", build_array(build_array(peer_id))); - - SIGNAL_UNWATCH(scene_multiplayer.ptr(), "peer_authentication_failed"); - } - - SUBCASE("peer_authentication_failed is emitted when authentication timeout") { - SIGNAL_WATCH(scene_multiplayer.ptr(), "peer_authentication_failed"); - scene_multiplayer->set_auth_timeout(0.01); - CHECK_EQ(scene_multiplayer->get_auth_timeout(), 0.01); - - // Adding two peesr to MultiplayerPeer. - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - int first_peer_id = 42; - int second_peer_id = 84; - multiplayer_peer->emit_signal(SNAME("peer_connected"), first_peer_id); - multiplayer_peer->emit_signal(SNAME("peer_connected"), second_peer_id); - - // Let timeout happens. - OS::get_singleton()->delay_usec(500000); - - CHECK_EQ(scene_multiplayer->poll(), Error::OK); - - SIGNAL_CHECK("peer_authentication_failed", build_array(build_array(first_peer_id), build_array(second_peer_id))); - - SIGNAL_UNWATCH(scene_multiplayer.ptr(), "peer_authentication_failed"); - } - - SUBCASE("Fails when there is no MultiplayerPeer configured") { - scene_multiplayer->set_multiplayer_peer(nullptr); - - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->send_auth(42, Vector()), Error::ERR_UNCONFIGURED); - ERR_PRINT_ON; - } - - SUBCASE("Fails when the peer to send the auth is not pending") { - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->send_auth(42, String("It's me").to_ascii_buffer()), Error::ERR_INVALID_PARAMETER); - ERR_PRINT_ON; - } -} - -TEST_CASE("[Multiplayer][SceneMultiplayer][SceneTree] Complete Authentication") { - Ref scene_multiplayer; - scene_multiplayer.instantiate(); - SceneTree::get_singleton()->set_multiplayer(scene_multiplayer); - scene_multiplayer->set_auth_callback(callable_mp_static(auth_callback)); - - SUBCASE("Is properly completed") { - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - int peer_id = 42; - multiplayer_peer->emit_signal(SNAME("peer_connected"), peer_id); - CHECK_EQ(scene_multiplayer->send_auth(peer_id, String("It's me").to_ascii_buffer()), Error::OK); - - CHECK_EQ(scene_multiplayer->complete_auth(peer_id), Error::OK); - } - - SUBCASE("Fails when there is no MultiplayerPeer configured") { - scene_multiplayer->set_multiplayer_peer(nullptr); - - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->complete_auth(42), Error::ERR_UNCONFIGURED); - ERR_PRINT_ON; - } - - SUBCASE("Fails when the peer to complete the auth is not pending") { - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->complete_auth(42), Error::ERR_INVALID_PARAMETER); - ERR_PRINT_ON; - } - - SUBCASE("Fails to send auth or completed for a second time") { - Ref multiplayer_peer = scene_multiplayer->get_multiplayer_peer(); - int peer_id = 42; - multiplayer_peer->emit_signal(SNAME("peer_connected"), peer_id); - CHECK_EQ(scene_multiplayer->send_auth(peer_id, String("It's me").to_ascii_buffer()), Error::OK); - CHECK_EQ(scene_multiplayer->complete_auth(peer_id), Error::OK); - - ERR_PRINT_OFF; - CHECK_EQ(scene_multiplayer->send_auth(peer_id, String("It's me").to_ascii_buffer()), Error::ERR_FILE_CANT_WRITE); - CHECK_EQ(scene_multiplayer->complete_auth(peer_id), Error::ERR_FILE_CANT_WRITE); - ERR_PRINT_ON; - } -} - -} // namespace TestSceneMultiplayer - #endif // TEST_SCENE_MULTIPLAYER_H diff --git a/tests/core/io/test_resource.h b/tests/core/io/test_resource.h index cb1fa290b339..9c44890b418f 100644 --- a/tests/core/io/test_resource.h +++ b/tests/core/io/test_resource.h @@ -39,6 +39,7 @@ #include "thirdparty/doctest/doctest.h" #include "tests/test_macros.h" +#include "tests/test_utils.h" namespace TestResource { diff --git a/tests/test_main.cpp b/tests/test_main.cpp index ba81218cd269..156369a1219f 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -37,149 +37,9 @@ #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" -#include "tests/core/input/test_input_event_mouse.h" -#include "tests/core/input/test_shortcut.h" -#include "tests/core/io/test_config_file.h" -#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_json_native.h" -#include "tests/core/io/test_marshalls.h" -#include "tests/core/io/test_packet_peer.h" -#include "tests/core/io/test_pck_packer.h" -#include "tests/core/io/test_resource.h" -#include "tests/core/io/test_stream_peer.h" -#include "tests/core/io/test_stream_peer_buffer.h" -#include "tests/core/io/test_tcp_server.h" -#include "tests/core/io/test_udp_server.h" -#include "tests/core/io/test_xml_parser.h" -#include "tests/core/math/test_aabb.h" -#include "tests/core/math/test_astar.h" -#include "tests/core/math/test_basis.h" -#include "tests/core/math/test_color.h" -#include "tests/core/math/test_expression.h" -#include "tests/core/math/test_geometry_2d.h" -#include "tests/core/math/test_geometry_3d.h" -#include "tests/core/math/test_math_funcs.h" -#include "tests/core/math/test_plane.h" -#include "tests/core/math/test_projection.h" -#include "tests/core/math/test_quaternion.h" -#include "tests/core/math/test_random_number_generator.h" -#include "tests/core/math/test_rect2.h" -#include "tests/core/math/test_rect2i.h" -#include "tests/core/math/test_transform_2d.h" -#include "tests/core/math/test_transform_3d.h" -#include "tests/core/math/test_vector2.h" -#include "tests/core/math/test_vector2i.h" -#include "tests/core/math/test_vector3.h" -#include "tests/core/math/test_vector3i.h" -#include "tests/core/math/test_vector4.h" -#include "tests/core/math/test_vector4i.h" -#include "tests/core/object/test_class_db.h" -#include "tests/core/object/test_method_bind.h" -#include "tests/core/object/test_object.h" -#include "tests/core/object/test_undo_redo.h" -#include "tests/core/os/test_os.h" -#include "tests/core/string/test_fuzzy_search.h" -#include "tests/core/string/test_node_path.h" -#include "tests/core/string/test_string.h" -#include "tests/core/string/test_translation.h" -#include "tests/core/string/test_translation_server.h" -#include "tests/core/templates/test_a_hash_map.h" -#include "tests/core/templates/test_command_queue.h" -#include "tests/core/templates/test_hash_map.h" -#include "tests/core/templates/test_hash_set.h" -#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" -#include "tests/core/test_crypto.h" -#include "tests/core/test_hashing_context.h" -#include "tests/core/test_time.h" -#include "tests/core/threads/test_worker_thread_pool.h" -#include "tests/core/variant/test_array.h" -#include "tests/core/variant/test_callable.h" -#include "tests/core/variant/test_dictionary.h" -#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_audio_stream_wav.h" -#include "tests/scene/test_bit_map.h" -#include "tests/scene/test_button.h" -#include "tests/scene/test_camera_2d.h" -#include "tests/scene/test_control.h" -#include "tests/scene/test_curve.h" -#include "tests/scene/test_curve_2d.h" -#include "tests/scene/test_curve_3d.h" -#include "tests/scene/test_fontfile.h" -#include "tests/scene/test_gradient.h" -#include "tests/scene/test_gradient_texture.h" -#include "tests/scene/test_image_texture.h" -#include "tests/scene/test_image_texture_3d.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" -#include "tests/scene/test_parallax_2d.h" -#include "tests/scene/test_path_2d.h" -#include "tests/scene/test_path_follow_2d.h" -#include "tests/scene/test_physics_material.h" -#include "tests/scene/test_sprite_frames.h" -#include "tests/scene/test_style_box_texture.h" -#include "tests/scene/test_texture_progress_bar.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" -#include "tests/servers/rendering/test_shader_preprocessor.h" -#include "tests/servers/test_text_server.h" -#include "tests/test_validate_testing.h" - -#ifndef ADVANCED_GUI_DISABLED -#include "tests/scene/test_code_edit.h" -#include "tests/scene/test_color_picker.h" -#include "tests/scene/test_graph_node.h" -#include "tests/scene/test_option_button.h" -#include "tests/scene/test_tab_bar.h" -#include "tests/scene/test_tab_container.h" -#include "tests/scene/test_text_edit.h" -#include "tests/scene/test_tree.h" -#endif // ADVANCED_GUI_DISABLED - -#ifndef _3D_DISABLED -#ifdef MODULE_NAVIGATION_ENABLED -#include "tests/scene/test_navigation_agent_2d.h" -#include "tests/scene/test_navigation_agent_3d.h" -#include "tests/scene/test_navigation_obstacle_2d.h" -#include "tests/scene/test_navigation_obstacle_3d.h" -#include "tests/scene/test_navigation_region_2d.h" -#include "tests/scene/test_navigation_region_3d.h" -#include "tests/servers/test_navigation_server_2d.h" -#include "tests/servers/test_navigation_server_3d.h" -#endif // MODULE_NAVIGATION_ENABLED - -#include "tests/scene/test_arraymesh.h" -#include "tests/scene/test_camera_3d.h" -#include "tests/scene/test_height_map_shape_3d.h" -#include "tests/scene/test_path_3d.h" -#include "tests/scene/test_path_follow_3d.h" -#include "tests/scene/test_primitives.h" -#include "tests/scene/test_skeleton_3d.h" -#include "tests/scene/test_sky.h" -#endif // _3D_DISABLED #include "modules/modules_tests.gen.h" -#include "tests/display_server_mock.h" #include "tests/test_macros.h" #include "scene/theme/theme_db.h" @@ -195,6 +55,8 @@ #endif // _3D_DISABLED #include "servers/rendering/rendering_server_default.h" +#include "tests/core/io/test_resource.h" + int test_main(int argc, char *argv[]) { bool run_tests = true;