You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fix an undefined behaviour
This commit is contained in:
@@ -415,6 +415,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
|
|||||||
TestResult result;
|
TestResult result;
|
||||||
result.status = GDTEST_OK;
|
result.status = GDTEST_OK;
|
||||||
result.output = String();
|
result.output = String();
|
||||||
|
result.passed = false;
|
||||||
|
|
||||||
Error err = OK;
|
Error err = OK;
|
||||||
|
|
||||||
@@ -498,6 +499,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
|
|||||||
}
|
}
|
||||||
// Script files matching this pattern are allowed to not contain a test() function.
|
// Script files matching this pattern are allowed to not contain a test() function.
|
||||||
if (source_file.match("*.notest.gd")) {
|
if (source_file.match("*.notest.gd")) {
|
||||||
|
enable_stdout();
|
||||||
|
result.passed = check_output(result.output);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// Test running.
|
// Test running.
|
||||||
|
|||||||
Reference in New Issue
Block a user