mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-20 19:41:58 +00:00
fix for non-64-bit test platforms
This commit is contained in:
1 parent
5a1ff125d7
commit
a6b2124fd5
1 file changed
+5
-4
+5
-4
@@ -2268,11 +2268,12 @@ static void test_str(void) {
|
|||||||
{ // mg_queue_printf()
|
{ // mg_queue_printf()
|
||||||
struct mg_queue q;
|
struct mg_queue q;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
uint32_t p = 0xffffffff;
|
||||||
|
size_t len;
|
||||||
mg_queue_init(&q, buf, sizeof(buf));
|
mg_queue_init(&q, buf, sizeof(buf));
|
||||||
void *p = (void *) 0xffffffffffffffff;
|
len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
|
||||||
size_t len = mg_queue_printf(&q, "A%p%p%pB", p, p, p);
|
ASSERT(len == 32);
|
||||||
ASSERT(len == 56);
|
ASSERT(memcmp(buf + 4, "A0xffffffff0xffffffff0xffffffffB", 32) == 0);
|
||||||
ASSERT(memcmp(buf + 4, "A0xffffffffffffffff0xffffffffffffffff0xffffffffffffffffB", 56) == 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non-standard formatting
|
// Non-standard formatting
|
||||||
|
|||||||
Reference in new issue
Block a user