Merge pull request #3293 from cesanta/tests

fix for non-64-bit test platforms
This commit is contained in:
Sergio R. Caprile authored and GitHub committed 2025-10-01 17:25:01 -03:00
commit 3273c20ca9
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