1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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
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')