aboutsummaryrefslogtreecommitdiff
path: root/tests/core/encoding
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-02-02 20:35:58 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-02-02 21:10:11 +0100
commit606f11ebe8e6bef1a8f0615c3cdceb556d8d6da6 (patch)
treefdd15d910f14f2cf4292f9da1762789304a7124b /tests/core/encoding
parent07a4f4d0178ffd22d37968bde2e4bfd02e3d22f2 (diff)
fix hxa test use after free, skip weird pow test failure
Diffstat (limited to 'tests/core/encoding')
-rw-r--r--tests/core/encoding/hxa/test_core_hxa.odin3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/core/encoding/hxa/test_core_hxa.odin b/tests/core/encoding/hxa/test_core_hxa.odin
index 5465f5d87..40c3c2e23 100644
--- a/tests/core/encoding/hxa/test_core_hxa.odin
+++ b/tests/core/encoding/hxa/test_core_hxa.odin
@@ -150,6 +150,7 @@ test_write :: proc(t: ^testing.T) {
required_size := hxa.required_write_size(w_file)
buf := make([]u8, required_size)
+ defer delete(buf)
n, write_err := hxa.write(buf, w_file)
write_e :: hxa.Write_Error.None
@@ -161,8 +162,6 @@ test_write :: proc(t: ^testing.T) {
tc.expect(t, read_err == read_e, fmt.tprintf("%v: read_err %v != %v", #procedure, read_err, read_e))
defer hxa.file_destroy(file)
- delete(buf)
-
tc.expect(t, file.magic_number == 0x417848, fmt.tprintf("%v: file.magic_number %v != %v",
#procedure, file.magic_number, 0x417848))
tc.expect(t, file.version == 3, fmt.tprintf("%v: file.version %v != %v", #procedure, file.version, 3))