godot/tests/core/templates
Rémi Verschelde c6cefb1b79
`Array`: Relax `slice` bound checks to properly handle negative indices
The same is done for `Vector` (and thus `Packed*Array`).

`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.

`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.

This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
..
test_command_queue.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_list.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_local_vector.h Add list initialization support for Vector & LocalVector 2022-01-05 20:42:09 +08:00
test_lru.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_oa_hash_map.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_oa_hash_map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_ordered_hash_map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_paged_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
test_vector.h `Array`: Relax `slice` bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00