1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-26 15:46:23 +00:00

Fix tests that fail when alone

This commit is contained in:
kit
2025-05-06 13:48:16 -04:00
parent 1a1cc0f7b0
commit 6d56d2d05e
2 changed files with 8 additions and 10 deletions

View File

@@ -48,8 +48,10 @@ TEST_SUITE("[Modules][GDScript]") {
REQUIRE_MESSAGE(fail_count == 0, "All GDScript tests should pass.");
}
}
#endif // TOOLS_ENABLED
TEST_CASE("[Modules][GDScript] Load source code dynamically and run it") {
GDScriptLanguage::get_singleton()->init();
Ref<GDScript> gdscript = memnew(GDScript);
gdscript->set_source_code(R"(
extends RefCounted
@@ -69,7 +71,6 @@ func _init():
ref_counted->set_script(gdscript);
CHECK_MESSAGE(int(ref_counted->get_meta("result")) == 42, "The script should assign object metadata successfully.");
}
#endif // TOOLS_ENABLED
TEST_CASE("[Modules][GDScript] Validate built-in API") {
GDScriptLanguage *lang = GDScriptLanguage::get_singleton();