You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Rename GDScript test script filenames to use snake_case
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
func args(a, b):
|
||||
print(a)
|
||||
print(b)
|
||||
|
||||
func test():
|
||||
args(1,)
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Too few arguments for "args()" call. Expected at least 2 but received 1.
|
||||
@@ -0,0 +1,2 @@
|
||||
func test():
|
||||
var a = ("missing paren ->"
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expected closing ")" after grouping expression.
|
||||
@@ -0,0 +1,3 @@
|
||||
func test():
|
||||
if true # Missing colon here.
|
||||
print("true")
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expected ":" after "if" condition.
|
||||
@@ -0,0 +1,6 @@
|
||||
func args(a, b):
|
||||
print(a)
|
||||
print(b)
|
||||
|
||||
func test():
|
||||
args(1,2
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expected closing ")" after call arguments.
|
||||
@@ -0,0 +1,3 @@
|
||||
func test():
|
||||
print("Using spaces")
|
||||
print("Using tabs")
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Used "\t" for indentation instead " " as used before in the file.
|
||||
@@ -0,0 +1,3 @@
|
||||
extends Node
|
||||
func test():
|
||||
var a = $ # Expected some node path.
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expect node path as string or identifier after "$".
|
||||
@@ -0,0 +1,3 @@
|
||||
extends Node
|
||||
func test():
|
||||
$23 # Can't use number here.
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expect node path as string or identifier after "$".
|
||||
@@ -0,0 +1,3 @@
|
||||
extends Node
|
||||
func test():
|
||||
$MyNode/23 # Can't use number here.
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_PARSER_ERROR
|
||||
Expect node path after "/".
|
||||
@@ -0,0 +1,2 @@
|
||||
func test():
|
||||
print("A"); print("B")
|
||||
@@ -0,0 +1,3 @@
|
||||
GDTEST_OK
|
||||
A
|
||||
B
|
||||
@@ -0,0 +1,7 @@
|
||||
# See https://github.com/godotengine/godot/issues/41066.
|
||||
|
||||
func f(p, ): ## <-- no errors
|
||||
print(p)
|
||||
|
||||
func test():
|
||||
f(0, ) ## <-- no error
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_OK
|
||||
0
|
||||
@@ -0,0 +1,12 @@
|
||||
var a # No init.
|
||||
var b = 42 # Init.
|
||||
|
||||
func test():
|
||||
var c # No init, local.
|
||||
var d = 23 # Init, local.
|
||||
|
||||
a = 1
|
||||
c = 2
|
||||
|
||||
prints(a, b, c, d)
|
||||
print("OK")
|
||||
@@ -0,0 +1,7 @@
|
||||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 5
|
||||
>> UNASSIGNED_VARIABLE
|
||||
>> The variable 'c' was used but never assigned a value.
|
||||
1 42 2 23
|
||||
OK
|
||||
@@ -0,0 +1,2 @@
|
||||
func test():
|
||||
var unused = "not used"
|
||||
@@ -0,0 +1,5 @@
|
||||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 2
|
||||
>> UNUSED_VARIABLE
|
||||
>> The local variable 'unused' is declared but never used in the block. If this is intended, prefix it with an underscore: '_unused'
|
||||
Reference in New Issue
Block a user