diff --git a/tests/core/slice/test_core_slice.odin b/tests/core/slice/test_core_slice.odin index 8ef3af869..05dfb58ff 100644 --- a/tests/core/slice/test_core_slice.odin +++ b/tests/core/slice/test_core_slice.odin @@ -127,11 +127,13 @@ test_sort_by_indices :: proc(t: ^testing.T) { { indices := make([]int, test_size) + defer delete(indices) for _, i in indices { indices[i] = i } sorted_indices := slice.sort_by_indices(indices, f_idx) + defer delete(sorted_indices) for v, i in sorted_indices { idx_pass := v == f_idx[i] expect(t, idx_pass, "Expected the sorted index to be the same as the result from sort_with_indices") @@ -142,6 +144,7 @@ test_sort_by_indices :: proc(t: ^testing.T) { } { indices := make([]int, test_size) + defer delete(indices) for _, i in indices { indices[i] = i } @@ -158,6 +161,10 @@ test_sort_by_indices :: proc(t: ^testing.T) { { indices := make([]int, test_size) swap := make([]int, test_size) + defer { + delete(indices) + delete(swap) + } for _, i in indices { indices[i] = i }