summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/analyzer
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out2
4 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.gd b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.gd
new file mode 100644
index 0000000000..c06fbd89ff
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.gd
@@ -0,0 +1,2 @@
+func test():
+ print(len(Color())) # GDScript utility function.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out
new file mode 100644
index 0000000000..9cb04f6240
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid argument for "len()" function: Value of type 'Color' can't provide a length.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.gd b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.gd
new file mode 100644
index 0000000000..dc6e26e682
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.gd
@@ -0,0 +1,2 @@
+func test():
+ print(floor(Color())) # Built-in utility function.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out
new file mode 100644
index 0000000000..27d2504dd0
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/utility_function_wrong_arg.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Invalid argument for "floor()" function: Argument "x" must be "int", "float", "Vector2", "Vector2i", "Vector3", "Vector3i", "Vector4", or "Vector4i".