Mercurial > hg > th-libs
comparison tests.c @ 402:ec4c395aadb8
Fix some tests.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 07 Mar 2016 09:29:53 +0200 |
parents | bffd3caf2d2c |
children | 2c83111b0703 |
comparison
equal
deleted
inserted
replaced
401:5a2ad6e49bfb | 402:ec4c395aadb8 |
---|---|
383 | 383 |
384 for (i4 = 0; i4 < NCOUNT(i_mods); i4++) | 384 for (i4 = 0; i4 < NCOUNT(i_mods); i4++) |
385 for (i3 = 0; i3 < NCOUNT(i_types); i3++) | 385 for (i3 = 0; i3 < NCOUNT(i_types); i3++) |
386 for (i2 = 0; i2 < NCOUNT(i_fmts); i2++) | 386 for (i2 = 0; i2 < NCOUNT(i_fmts); i2++) |
387 { | 387 { |
388 snprintf(buf2, sizeof(buf2), "%s%sll%s", i_mods[i4], i_fmts[i2], i_types[i3]); | 388 snprintf(buf2, sizeof(buf2), "%%%s%sll%s", i_mods[i4], i_fmts[i2], i_types[i3]); |
389 test_snprintf(buf, buf2, i_vals64[i1]); | 389 test_snprintf(buf, buf2, i_vals64[i1]); |
390 } | 390 } |
391 } | 391 } |
392 } | 392 } |
393 | 393 |
426 test_snprintf(c_msg, c_fmts[i1], c_val); | 426 test_snprintf(c_msg, c_fmts[i1], c_val); |
427 } | 427 } |
428 | 428 |
429 if (test_set_start("printf() pointers")) | 429 if (test_set_start("printf() pointers")) |
430 { | 430 { |
431 char *p_fmts[] = { "%p", "%8p", "%32p", "%032p", "%-32p", "%-032p", "%16.8p", "%016.8p" }; | 431 char *p_fmts[] = { "%p", "%2p", "%.2p", "%8p", "%32p", "%032p", "%-32p", "%-032p", "%16.8p", "%016.8p" }; |
432 void *p_vals[] = { NULL, (void *) 1, &p_fmts, }; | 432 void *p_vals[] = { NULL, (void *) 1, &p_fmts, }; |
433 | 433 |
434 for (i1 = 0; i1 < NCOUNT(p_vals); i1++) | 434 for (i1 = 0; i1 < NCOUNT(p_vals); i1++) |
435 { | 435 { |
436 snprintf(buf, sizeof(buf), "%p", p_vals[i1]); | 436 snprintf(buf, sizeof(buf), "%p", p_vals[i1]); |