From 71f7c8a9d3dcab04223b377a422637c4cedffca0 Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Wed, 28 Dec 2022 04:34:00 +0200 Subject: GDScript: Fix multiline and trailing comma for assert --- .../scripts/parser/features/multiline_assert.gd | 24 ++++++++++++++++++++++ .../scripts/parser/features/multiline_assert.out | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 modules/gdscript/tests/scripts/parser/features/multiline_assert.gd create mode 100644 modules/gdscript/tests/scripts/parser/features/multiline_assert.out (limited to 'modules/gdscript/tests') 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 -- cgit v1.2.3