Skip to content

Commit 3273c20

Browse files
authored
Merge pull request #3293 from cesanta/tests
fix for non-64-bit test platforms
2 parents 5a1ff12 + a6b2124 commit 3273c20

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/unit_test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,11 +2268,12 @@ static void test_str(void) {
22682268
{ // mg_queue_printf()
22692269
struct mg_queue q;
22702270
char buf[128];
2271+
uint32_t p = 0xffffffff;
2272+
size_t len;
22712273
mg_queue_init(&q, buf, sizeof(buf));
2272-
void *p = (void *) 0xffffffffffffffff;
2273-
size_t len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
2274-
ASSERT(len == 56);
2275-
ASSERT(memcmp(buf + 4, "A0xffffffffffffffff0xffffffffffffffff0xffffffffffffffffB", 56) == 0);
2274+
len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
2275+
ASSERT(len == 32);
2276+
ASSERT(memcmp(buf + 4, "A0xffffffff0xffffffff0xffffffffB", 32) == 0);
22762277
}
22772278

22782279
// Non-standard formatting

0 commit comments

Comments
 (0)