From 57eb941cd9b4a608cc61ada10fd2173d30b659c3 Mon Sep 17 00:00:00 2001 From: mio Date: Sun, 13 Apr 2025 23:26:04 +0800 Subject: [PATCH] more fix for endianess --- tests/unit/test_mem.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/test_mem.c b/tests/unit/test_mem.c index 8fef848b..459e6038 100644 --- a/tests/unit/test_mem.c +++ b/tests/unit/test_mem.c @@ -361,19 +361,19 @@ static void test_snapshot_with_vtlb(void) OK(uc_emu_start(uc, 0x400000000 + 0x1000, 0x400000000 + 0x1000 + sizeof(code) - 1, 0, 0)); OK(uc_mem_read(uc, 0x2020, &mem, sizeof(mem))); - TEST_CHECK(mem == 1); + TEST_CHECK(LEINT32(mem) == 1); OK(uc_context_save(uc, c1)); OK(uc_emu_start(uc, 0x400000000 + 0x1000, 0x400000000 + 0x1000 + sizeof(code) - 1, 0, 0)); OK(uc_mem_read(uc, 0x2020, &mem, sizeof(mem))); - TEST_CHECK(mem == 2); + TEST_CHECK(LEINT32(mem) == 2); OK(uc_context_restore(uc, c1)); // TODO check mem OK(uc_mem_read(uc, 0x2020, &mem, sizeof(mem))); - TEST_CHECK(mem == 1); + TEST_CHECK(LEINT32(mem) == 1); OK(uc_context_restore(uc, c0)); OK(uc_mem_read(uc, 0x2020, &mem, sizeof(mem))); - TEST_CHECK(mem == 0); + TEST_CHECK(LEINT32(mem) == 0); // TODO check mem OK(uc_context_free(c0));