Merge pull request #110097 from aaronp64/array_tests

Add more `Array` tests
This commit is contained in:
Thaddeus Crews 2025-09-19 13:07:13 -05:00
commit 8265bb8b6a
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
3 changed files with 160 additions and 9 deletions

View file

@ -0,0 +1,5 @@
func test():
var array := [1, 2, 3]
array.set(4, 4)
var _value = array.get(4)
_value = array[4]

View file

@ -0,0 +1,4 @@
GDTEST_RUNTIME_ERROR
>> ERROR: Index p_index = 4 is out of bounds (p_instance->size() = 3).
>> ERROR: Index p_index = 4 is out of bounds (p_instance->size() = 3).
>> SCRIPT ERROR at runtime/errors/array_bad_index.gd:5 on test(): Out of bounds get index '4' (on base: 'Array')