From b15a665898e72433d8b1486819cd57cc2a9b5f71 Mon Sep 17 00:00:00 2001 From: Feoramund <161657516+Feoramund@users.noreply.github.com> Date: Thu, 29 May 2025 16:04:56 -0400 Subject: [PATCH] Add tests for `runtime.memory_*` comparison procedures --- tests/core/runtime/test_core_runtime.odin | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/tests/core/runtime/test_core_runtime.odin b/tests/core/runtime/test_core_runtime.odin index 472a5527d..6bbb9fb8a 100644 --- a/tests/core/runtime/test_core_runtime.odin +++ b/tests/core/runtime/test_core_runtime.odin @@ -4,6 +4,7 @@ package test_core_runtime import "base:intrinsics" import "core:mem" import "base:runtime" +import "core:slice" import "core:testing" // Tests that having space for the allocation, but not for the allocation and alignment @@ -177,3 +178,78 @@ test_map_get :: proc(t: ^testing.T) { check(t, m) } } + +@(test) +test_memory_equal :: proc(t: ^testing.T) { + data: [256]u8 + cmp: [256]u8 + + slice.fill(data[:], 0xAA) + slice.fill(cmp[:], 0xAA) + + for offset in 0..