diff options
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd | 9 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out | 3 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_argument.gd (renamed from modules/gdscript/tests/scripts/parser-errors/missing-argument.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_argument.out (renamed from modules/gdscript/tests/scripts/parser-errors/missing-argument.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd (renamed from modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.out (renamed from modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_colon.gd (renamed from modules/gdscript/tests/scripts/parser-errors/missing-colon.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_colon.out (renamed from modules/gdscript/tests/scripts/parser-errors/missing-colon.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd (renamed from modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.out (renamed from modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.gd (renamed from modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.out (renamed from modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd (renamed from modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.out (renamed from modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd (renamed from modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.out (renamed from modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd (renamed from modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.out (renamed from modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd (renamed from modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out (renamed from modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.gd (renamed from modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.out (renamed from modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/variable_declaration.gd (renamed from modules/gdscript/tests/scripts/parser-features/variable-declaration.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/features/variable_declaration.out (renamed from modules/gdscript/tests/scripts/parser-features/variable-declaration.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd (renamed from modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/parser/warnings/unused_variable.out (renamed from modules/gdscript/tests/scripts/parser-warnings/unused-variable.out) | 0 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd | 5 | ||||
-rw-r--r-- | modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out | 6 |
28 files changed, 23 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd new file mode 100644 index 0000000000..d21d8bce96 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.gd @@ -0,0 +1,9 @@ +extends Node + +func test(): + set_name("TestNodeName") + if get_name() == &"TestNodeName": + print("Name is equal") + else: + print("Name is not equal") + print(get_name() is StringName) diff --git a/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out new file mode 100644 index 0000000000..dc4348d9c3 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/call_self_get_name.out @@ -0,0 +1,3 @@ +GDTEST_OK +Name is equal +True diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-argument.gd b/modules/gdscript/tests/scripts/parser/errors/missing_argument.gd index c56ad94095..c56ad94095 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-argument.gd +++ b/modules/gdscript/tests/scripts/parser/errors/missing_argument.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-argument.out b/modules/gdscript/tests/scripts/parser/errors/missing_argument.out index fc2a891109..fc2a891109 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-argument.out +++ b/modules/gdscript/tests/scripts/parser/errors/missing_argument.out diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.gd b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd index a1077e1985..a1077e1985 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.gd +++ b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.out b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.out index 7326afa33d..7326afa33d 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-closing-expr-paren.out +++ b/modules/gdscript/tests/scripts/parser/errors/missing_closing_expr_paren.out diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-colon.gd b/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd index 62cb633e9e..62cb633e9e 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-colon.gd +++ b/modules/gdscript/tests/scripts/parser/errors/missing_colon.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-colon.out b/modules/gdscript/tests/scripts/parser/errors/missing_colon.out index 687b963bc8..687b963bc8 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-colon.out +++ b/modules/gdscript/tests/scripts/parser/errors/missing_colon.out diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.gd b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd index 116b0151da..116b0151da 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.gd +++ b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.out b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.out index 34ea7ac323..34ea7ac323 100644 --- a/modules/gdscript/tests/scripts/parser-errors/missing-paren-after-args.out +++ b/modules/gdscript/tests/scripts/parser/errors/missing_paren_after_args.out diff --git a/modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.gd b/modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.gd index 9ad77f1432..9ad77f1432 100644 --- a/modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.gd +++ b/modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.out b/modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.out index 6390de9788..6390de9788 100644 --- a/modules/gdscript/tests/scripts/parser-errors/mixing-tabs-spaces.out +++ b/modules/gdscript/tests/scripts/parser/errors/mixing_tabs_spaces.out diff --git a/modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.gd b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd index 3875ce3936..3875ce3936 100644 --- a/modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.gd +++ b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.out b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.out index b3dc181a22..b3dc181a22 100644 --- a/modules/gdscript/tests/scripts/parser-errors/nothing-after-dollar.out +++ b/modules/gdscript/tests/scripts/parser/errors/nothing_after_dollar.out diff --git a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.gd b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd index 6fd2692d47..6fd2692d47 100644 --- a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.gd +++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.out b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.out index b3dc181a22..b3dc181a22 100644 --- a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar.out +++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar.out diff --git a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.gd b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd index 1836d42226..1836d42226 100644 --- a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.gd +++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.gd diff --git a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.out b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.out index dcb4ccecb0..dcb4ccecb0 100644 --- a/modules/gdscript/tests/scripts/parser-errors/wrong-value-after-dollar-slash.out +++ b/modules/gdscript/tests/scripts/parser/errors/wrong_value_after_dollar_slash.out diff --git a/modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.gd b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd index 08f2eedb2d..08f2eedb2d 100644 --- a/modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.gd +++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.gd diff --git a/modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.out b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out index fc03f3efe8..fc03f3efe8 100644 --- a/modules/gdscript/tests/scripts/parser-features/semicolon-as-end-statement.out +++ b/modules/gdscript/tests/scripts/parser/features/semicolon_as_end_statement.out diff --git a/modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.gd b/modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.gd index 6097b11b10..6097b11b10 100644 --- a/modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.gd +++ b/modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.gd diff --git a/modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.out b/modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.out index 94e2ec2af8..94e2ec2af8 100644 --- a/modules/gdscript/tests/scripts/parser-features/trailing-comma-in-function-args.out +++ b/modules/gdscript/tests/scripts/parser/features/trailing_comma_in_function_args.out diff --git a/modules/gdscript/tests/scripts/parser-features/variable-declaration.gd b/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd index 3b48f10ca7..3b48f10ca7 100644 --- a/modules/gdscript/tests/scripts/parser-features/variable-declaration.gd +++ b/modules/gdscript/tests/scripts/parser/features/variable_declaration.gd diff --git a/modules/gdscript/tests/scripts/parser-features/variable-declaration.out b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out index 2e0a63c024..2e0a63c024 100644 --- a/modules/gdscript/tests/scripts/parser-features/variable-declaration.out +++ b/modules/gdscript/tests/scripts/parser/features/variable_declaration.out diff --git a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd index 68e3bd424f..68e3bd424f 100644 --- a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.gd +++ b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.gd diff --git a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.out b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out index 270e0e69c0..270e0e69c0 100644 --- a/modules/gdscript/tests/scripts/parser-warnings/unused-variable.out +++ b/modules/gdscript/tests/scripts/parser/warnings/unused_variable.out 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 new file mode 100644 index 0000000000..10780b5379 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.gd @@ -0,0 +1,5 @@ +func test(): + var node := Node.new() + var inside_tree = node.is_inside_tree + node.free() + inside_tree.call() 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 new file mode 100644 index 0000000000..e585c374e2 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/errors/callable_call_after_free_object.out @@ -0,0 +1,6 @@ +GDTEST_RUNTIME_ERROR +>> SCRIPT ERROR +>> on function: test() +>> runtime/errors/callable_call_after_free_object.gd +>> 5 +>> Attempt to call function 'null::is_inside_tree (Callable)' on a null instance. |