-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dozens of new integration tests to the GDScript test suite #48029
Add dozens of new integration tests to the GDScript test suite #48029
Conversation
e8d2502
to
8e4d8c5
Compare
Seems like static checks occasionally cause CI errors with |
8e4d8c5
to
6b7ebf7
Compare
This should be fixed now. Edit: Removed the For reference, the code of the test is below: func test():
var some_bool = 5 as bool
var some_int = 5 as int
var some_float = 5 as float
print(typeof(some_bool))
print(typeof(some_int))
print(typeof(some_float))
print()
var some_bool_typed := 5 as bool
var some_int_typed := 5 as int
var some_float_typed := 5 as float
print(typeof(some_bool_typed))
print(typeof(some_int_typed))
print(typeof(some_float_typed)) Crash backtrace from macOS:
Edit 2: I'm still getting a crash elsewhere unfortunately (but still not locally). I guess I'll have to remove scripts one by one until it stops crashing… |
6b7ebf7
to
6cdabaa
Compare
6cdabaa
to
6fb5d26
Compare
Built and tested.
|
Fixed 🙂 |
6fb5d26
to
cb72bf8
Compare
@Calinou Whats the state of this? :) |
It should be mergeable now. We can add more tests later as needed. I rebased it on the latest |
cb72bf8
to
c584bdf
Compare
c584bdf
to
8a49851
Compare
CI disagrees :P |
8a49851
to
ca095f8
Compare
I've added many tests related to heavy nesting of various things in |
modules/gdscript/tests/scripts/parser/errors/assignment_to_constant.out
Outdated
Show resolved
Hide resolved
>> WARNING | ||
>> Line: 2 | ||
>> UNUSED_LOCAL_CONSTANT | ||
>> The local constant '_TEST' is declared but never used in the block. If this is intended, prefix it with an underscore: '__TEST' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a fix in the GDScript code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to fix that warning in the GDScript code. Should I ignore it or should I wait for a fix PR to be made first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say leave like this for now, but open an issue about it.
modules/gdscript/tests/scripts/parser/features/float_notation.out
Outdated
Show resolved
Hide resolved
modules/gdscript/tests/scripts/parser/features/string_formatting.out
Outdated
Show resolved
Hide resolved
This also ignores `.out` files in the file format static checks.
ca095f8
to
c0083c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for working on this.
Thanks! |
@@ -0,0 +1,3 @@ | |||
func test(): | |||
# Error here. | |||
print(2 << 4.4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be >>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch – I'll fix this in an upcoming PR 🙂
Edit: Fixed in #52718.
This also makes all scripts use tab indentation (except the ones specifically designed to test space indentation or mixed tab/space indentation).
Reviewing tip: Use the file filter to hide
.out
files in the Files changed tab:dictionary_consecutive_commas (test that currently crashes)