diff options
author | George Marques <george@gmarqu.es> | 2022-02-01 21:31:12 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2022-02-03 13:32:33 -0300 |
commit | b013c0d544e784392020aa693fd248fa52f450c2 (patch) | |
tree | 751e7557e050231e590be87352345ba0b5d8e3af /modules/gdscript/tests/scripts | |
parent | ad6e2e82a9e2f7e6f6db99a7be474a1f2f2739bf (diff) |
GDScript: Allow tests to run on release builds
- Fix compilation issues by disabling warnings on release builds. This
also strips warnings from expected result before the comparison to
avoid false mismatches.
- Add a `#debug-only` flag to tests. Must be the first line of the test
script. Those won't run with release builds. Can be used for test
cases that rely on checks only available on debug builds.
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd | 1 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd index 10780b5379..7b3c112fe9 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd +++ b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd @@ -1,3 +1,4 @@ +#debug-only func test(): var node := Node.new() var inside_tree = node.is_inside_tree diff --git a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out index e585c374e2..fe48ade26b 100644 --- a/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out +++ b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out @@ -2,5 +2,5 @@ GDTEST_RUNTIME_ERROR >> SCRIPT ERROR >> on function: test() >> runtime/errors/callable_call_after_free_object.gd ->> 5 +>> 6 >> Attempt to call function 'null::is_inside_tree (Callable)' on a null instance. |