fix for non-64-bit test platforms

This commit is contained in:
Sergio R. Caprile committed 2025-10-01 17:06:39 -03:00
1 parent 5a1ff125d7
commit a6b2124fd5
1 file changed
+5 -4
+5 -4
View File
@@ -2268,11 +2268,12 @@ static void test_str(void) {
{ // mg_queue_printf()
struct mg_queue q;
char buf[128];
uint32_t p = 0xffffffff;
size_t len;
mg_queue_init(&q, buf, sizeof(buf));
void *p = (void *) 0xffffffffffffffff;
size_t len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
ASSERT(len == 56);
ASSERT(memcmp(buf + 4, "A0xffffffffffffffff0xffffffffffffffff0xffffffffffffffffB", 56) == 0);
len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
ASSERT(len == 32);
ASSERT(memcmp(buf + 4, "A0xffffffff0xffffffff0xffffffffB", 32) == 0);
}
// Non-standard formatting