diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-09 14:19:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-09 14:19:37 +0100 |
commit | c2f7c2d31ac0d97c0921aa4b37f3278ceefd0ffe (patch) | |
tree | dd120b7465520d40b10232ab3234a131cbaae302 /modules/gdscript/tests | |
parent | 88940571f263d694b7f13459716c02e8ac7080b1 (diff) | |
parent | 71f7c8a9d3dcab04223b377a422637c4cedffca0 (diff) |
Merge pull request #70655 from vonagam/fix-assert-multiline
GDScript: Fix multiline and trailing comma for assert
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/multiline_assert.gd | 24 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/multiline_assert.out | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd b/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd new file mode 100644 index 0000000000..8c699c604d --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/multiline_assert.gd @@ -0,0 +1,24 @@ +func test(): + var x := 5 + + assert(x > 0) + assert(x > 0,) + assert(x > 0, 'message') + assert(x > 0, 'message',) + + assert( + x > 0 + ) + assert( + x > 0, + ) + assert( + x > 0, + 'message' + ) + assert( + x > 0, + 'message', + ) + + print('OK') diff --git a/modules/gdscript/tests/scripts/parser/features/multiline_assert.out b/modules/gdscript/tests/scripts/parser/features/multiline_assert.out new file mode 100644 index 0000000000..1ccb591560 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/multiline_assert.out @@ -0,0 +1,2 @@ +GDTEST_OK +OK |