GDScript: Fix test for read-only state of constants
This commit is contained in:
parent
d1e5903c67
commit
abe6d67232
14 changed files with 43 additions and 52 deletions
|
|
@ -0,0 +1,10 @@
|
|||
const array: Array = [0]
|
||||
const dictionary := {1: 2}
|
||||
|
||||
@warning_ignore("assert_always_true")
|
||||
func test():
|
||||
assert(array.is_read_only() == true)
|
||||
assert(str(array) == '[0]')
|
||||
assert(dictionary.is_read_only() == true)
|
||||
assert(str(dictionary) == '{ 1: 2 }')
|
||||
print('ok')
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
GDTEST_OK
|
||||
ok
|
||||
Loading…
Add table
Add a link
Reference in a new issue