Add more Array tests
Added more tests for Array, focusing on methods exposed to gdscript that didn't have tests.
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
func test():
|
||||
var array := [1, 2, 3]
|
||||
array.set(4, 4)
|
||||
var _value = array.get(4)
|
||||
_value = array[4]
|
||||
@ -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')
|
||||
Reference in New Issue
Block a user