Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/gdscript/tests/gdscript_test_runner_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this solve the TODO on line 39?

Copy link
Contributor Author

@kitbdev kitbdev May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the Script compilation and runtime test still fails, and it only fails in template/release builds unlike these ones which fail when alone.
Unfortunately it is more complex to fix.

Ref<GDScript> gdscript = memnew(GDScript);
gdscript->set_source_code(R"(
extends RefCounted
Expand All @@ -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();
Expand Down
15 changes: 6 additions & 9 deletions tests/core/config/test_project_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,25 @@ class TestProjectSettingsInternalsAccessor {

namespace TestProjectSettings {

// TODO: Handle some cases failing on release builds. See: https://github.com/godotengine/godot/pull/88452
#ifdef TOOLS_ENABLED
TEST_CASE("[ProjectSettings] Get existing setting") {
CHECK(ProjectSettings::get_singleton()->has_setting("application/config/name"));
CHECK(ProjectSettings::get_singleton()->has_setting("application/run/main_scene"));

Variant variant = ProjectSettings::get_singleton()->get_setting("application/config/name");
Variant variant = ProjectSettings::get_singleton()->get_setting("application/run/main_scene");
CHECK_EQ(variant.get_type(), Variant::STRING);

String name = variant;
CHECK_EQ(name, "GDScript Integration Test Suite");
CHECK_EQ(name, String());
}

TEST_CASE("[ProjectSettings] Default value is ignored if setting exists") {
CHECK(ProjectSettings::get_singleton()->has_setting("application/config/name"));
CHECK(ProjectSettings::get_singleton()->has_setting("application/run/main_scene"));

Variant variant = ProjectSettings::get_singleton()->get_setting("application/config/name", "SomeDefaultValue");
Variant variant = ProjectSettings::get_singleton()->get_setting("application/run/main_scene", "SomeDefaultValue");
CHECK_EQ(variant.get_type(), Variant::STRING);

String name = variant;
CHECK_EQ(name, "GDScript Integration Test Suite");
CHECK_EQ(name, String());
}
#endif // TOOLS_ENABLED

TEST_CASE("[ProjectSettings] Non existing setting is null") {
CHECK_FALSE(ProjectSettings::get_singleton()->has_setting("not_existing_setting"));
Expand Down