GDScript: Replace assert() with Utils.check() in tests

This commit is contained in:
Danil Alexeev 2024-08-28 17:41:52 +03:00
parent f648de1a83
commit c1322d41e6
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
32 changed files with 275 additions and 347 deletions

View file

@ -3,14 +3,13 @@ const const_color: Color = 'red'
func func_color(arg_color: Color = 'blue') -> bool:
return arg_color == Color.BLUE
@warning_ignore("assert_always_true")
func test():
assert(const_color == Color.RED)
Utils.check(const_color == Color.RED)
assert(func_color() == true)
assert(func_color('blue') == true)
Utils.check(func_color() == true)
Utils.check(func_color('blue') == true)
var var_color: Color = 'green'
assert(var_color == Color.GREEN)
Utils.check(var_color == Color.GREEN)
print('ok')