Lines Matching refs:test

92     result |= test(__LINE__, "0", "%.7g", printf_float(0.0));
93 result |= test(__LINE__, "0.33", "%.*f", 2, printf_float(0.33333333));
96 result |= test(__LINE__, "foo", "%.3s", "foobar");
97 result |= test(__LINE__, " 00004", "%10.5d", 4);
98 result |= test(__LINE__, " 42", "% d", 42);
100 result |= test(__LINE__, "-42", "% d", -42);
102 result |= test(__LINE__, " 42", "% 5d", 42);
103 result |= test(__LINE__, " -42", "% 5d", -42);
104 result |= test(__LINE__, " 42", "% 15d", 42);
105 result |= test(__LINE__, " -42", "% 15d", -42);
106 result |= test(__LINE__, "+42", "%+d", 42);
107 result |= test(__LINE__, "-42", "%+d", -42);
108 result |= test(__LINE__, " +42", "%+5d", 42);
109 result |= test(__LINE__, " -42", "%+5d", -42);
110 result |= test(__LINE__, " +42", "%+15d", 42);
111 result |= test(__LINE__, " -42", "%+15d", -42);
113 result |= test(__LINE__, "42", "%0d", 42);
114 result |= test(__LINE__, "-42", "%0d", -42);
116 result |= test(__LINE__, "00042", "%05d", 42);
117 result |= test(__LINE__, "-0042", "%05d", -42);
118 result |= test(__LINE__, "000000000000042", "%015d", 42);
119 result |= test(__LINE__, "-00000000000042", "%015d", -42);
121 result |= test(__LINE__, "42", "%-d", 42);
122 result |= test(__LINE__, "-42", "%-d", -42);
124 result |= test(__LINE__, "42 ", "%-5d", 42);
125 result |= test(__LINE__, "-42 ", "%-5d", -42);
126 result |= test(__LINE__, "42 ", "%-15d", 42);
127 result |= test(__LINE__, "-42 ", "%-15d", -42);
129 result |= test(__LINE__, "42", "%-0d", 42);
130 result |= test(__LINE__, "-42", "%-0d", -42);
132 result |= test(__LINE__, "42 ", "%-05d", 42);
133 result |= test(__LINE__, "-42 ", "%-05d", -42);
134 result |= test(__LINE__, "42 ", "%-015d", 42);
135 result |= test(__LINE__, "-42 ", "%-015d", -42);
137 result |= test(__LINE__, "42", "%0-d", 42);
138 result |= test(__LINE__, "-42", "%0-d", -42);
140 result |= test(__LINE__, "42 ", "%0-5d", 42);
141 result |= test(__LINE__, "-42 ", "%0-5d", -42);
142 result |= test(__LINE__, "42 ", "%0-15d", 42);
143 result |= test(__LINE__, "-42 ", "%0-15d", -42);
146 result |= test(__LINE__, "42.90", "%.2f", printf_float(42.8952));
147 result |= test(__LINE__, "42.90", "%.2F", printf_float(42.8952));
149 result |= test(__LINE__, "42.89520", "%.5f", printf_float(42.8952));
151 result |= test(__LINE__, "42.8952000000", "%.10f", printf_float(42.8952));
153 result |= test(__LINE__, "42.90", "%1.2f", printf_float(42.8952));
154 result |= test(__LINE__, " 42.90", "%6.2f", printf_float(42.8952));
155 result |= test(__LINE__, "+42.90", "%+6.2f", printf_float(42.8952));
157 result |= test(__LINE__, "42.89520", "%5.5f", printf_float(42.8952));
159 result |= test(__LINE__, "42.8952000000", "%5.10f", printf_float(42.8952));
166 result |= test(__LINE__, "Hot Pocket", "%1$s %2$s", "Hot", "Pocket");
167 result |= test(__LINE__, "Pocket Hot", "%2$s %1$s", "Hot", "Pocket");
168 result |= test(__LINE__, "0002 1 hi", "%2$04d %1$*3$d %4$s", 1, 2, 3, "hi");
169 result |= test(__LINE__, " ab", "%1$*2$.*3$s", "abc", 5, 2);
171 …result |= test(__LINE__, "12.0 Hot Pockets", "%1$.1f %2$s %3$ss", printf_float(12.0), "Hot", "Pock…
172 …result |= test(__LINE__, "12.0 Hot Pockets", "%1$.*4$f %2$s %3$ss", printf_float(12.0), "Hot", "Po…
173 …result |= test(__LINE__, " 12.0 Hot Pockets", "%1$*5$.*4$f %2$s %3$ss", printf_float(12.0), "Hot",…
174 …result |= test(__LINE__, " 12.0 Hot Pockets 5", "%1$5.*4$f %2$s %3$ss %5$d", printf_float(12.0), "…
176 result |= test(__LINE__,
186 result |= test(__LINE__, "%(foo", "%(foo");
189 result |= test(__LINE__, " foo", "%*s", 4, "foo");
192 result |= test(__LINE__, " 3.14", "%*.*f", 10, 2, printf_float(3.14159265));
193 result |= test(__LINE__, "3.14 ", "%-*.*f", 10, 2, printf_float(3.14159265));
201 result |= test(__LINE__, SQRT2_60, "%.3f", printf_float(1.4142135623730950e60));
207 result |= test(__LINE__, "+hello+", "+%s+", "hello");
208 result |= test(__LINE__, "+10+", "+%d+", 10);
209 result |= test(__LINE__, "a", "%c", 'a');
210 result |= test(__LINE__, " ", "%c", 32);
211 result |= test(__LINE__, "$", "%c", 36);
212 result |= test(__LINE__, "10", "%d", 10);
215 result |= test(__LINE__, I("1000000","16960"), "%'d", 1000000);
223 result |= test(__LINE__, " +7.894561e+08", "%+#22.6e", printf_float(7.89456123e8));
224 result |= test(__LINE__, "7.894561e+08 ", "%-#22.6e", printf_float(7.89456123e8));
225 result |= test(__LINE__, " 7.894561e+08", "%#22.6e", printf_float(7.89456123e8));
227 result |= test(__LINE__, "+7.894561230000000e+08", "%+#22.15e", printf_float(7.89456123e8));
228 result |= test(__LINE__, "7.894561230000000e+08 ", "%-#22.15e", printf_float(7.89456123e8));
229 result |= test(__LINE__, " 7.894561230000000e+08", "%#22.15e", printf_float(7.89456123e8));
231 result |= test(__LINE__, "8.e+08", "%#1.1g", printf_float(7.89456123e8));
235 result |= test(__LINE__, " +100", "%+8lld", 100LL);
237 result |= test(__LINE__, " +100", "%+8Ld", 100LL);
239 result |= test(__LINE__, "+00000100", "%+.8lld", 100LL);
240 result |= test(__LINE__, " +00000100", "%+10.8lld", 100LL);
243 result |= test(__LINE__, "%_1lld", "%_1lld", 100LL);
246 result |= test(__LINE__, "-00100", "%-1.5lld", -100LL);
247 result |= test(__LINE__, " 100", "%5lld", 100LL);
248 result |= test(__LINE__, " -100", "%5lld", -100LL);
249 result |= test(__LINE__, "100 ", "%-5lld", 100LL);
250 result |= test(__LINE__, "-100 ", "%-5lld", -100LL);
251 result |= test(__LINE__, "00100", "%-.5lld", 100LL);
252 result |= test(__LINE__, "-00100", "%-.5lld", -100LL);
253 result |= test(__LINE__, "00100 ", "%-8.5lld", 100LL);
254 result |= test(__LINE__, "-00100 ", "%-8.5lld", -100LL);
255 result |= test(__LINE__, "00100", "%05lld", 100LL);
256 result |= test(__LINE__, "-0100", "%05lld", -100LL);
257 result |= test(__LINE__, " 100", "% lld", 100LL);
258 result |= test(__LINE__, "-100", "% lld", -100LL);
259 result |= test(__LINE__, " 100", "% 5lld", 100LL);
260 result |= test(__LINE__, " -100", "% 5lld", -100LL);
261 result |= test(__LINE__, " 00100", "% .5lld", 100LL);
262 result |= test(__LINE__, "-00100", "% .5lld", -100LL);
263 result |= test(__LINE__, " 00100", "% 8.5lld", 100LL);
264 result |= test(__LINE__, " -00100", "% 8.5lld", -100LL);
265 result |= test(__LINE__, "", "%.0lld", 0LL);
266 result |= test(__LINE__, " 0x00ffffffffffffff9c", "%#+21.18llx", -100LL);
267 result |= test(__LINE__, "0001777777777777777777634", "%#.25llo", -100LL);
268 result |= test(__LINE__, " 01777777777777777777634", "%#+24.20llo", -100LL);
269 result |= test(__LINE__, "0X00000FFFFFFFFFFFFFF9C", "%#+18.21llX", -100LL);
270 result |= test(__LINE__, "001777777777777777777634", "%#+20.24llo", -100LL);
271 result |= test(__LINE__, " 0018446744073709551615", "%#+25.22llu", -1LL);
272 result |= test(__LINE__, " 0018446744073709551615", "%#+25.22llu", -1LL);
273 result |= test(__LINE__, " 0000018446744073709551615", "%#+30.25llu", -1LL);
274 result |= test(__LINE__, " -0000000000000000000001", "%+#25.22lld", -1LL);
275 result |= test(__LINE__, "00144 ", "%#-8.5llo", 100LL);
276 result |= test(__LINE__, "+00100 ", "%#-+ 08.5lld", 100LL);
277 result |= test(__LINE__, "+00100 ", "%#-+ 08.5lld", 100LL);
278 result |= test(__LINE__, "0000000000000000000000000000000000000001", "%.40lld", 1LL);
279 result |= test(__LINE__, " 0000000000000000000000000000000000000001", "% .40lld", 1LL);
283 result |= test(__LINE__, " 0000000000000000000000000000000000000001", "% .40d", 1);
288 result |= test(__LINE__, " 1", "% d", 1);
289 result |= test(__LINE__, "+1", "%+ d", 1);
290 result |= test(__LINE__, "0x0000000001", "%#012x", 1);
291 result |= test(__LINE__, "0x00000001", "%#04.8x", 1);
292 result |= test(__LINE__, "0x01 ", "%#-08.2x", 1);
293 result |= test(__LINE__, "00000001", "%#08o", 1);
295 result |= test(__LINE__, "0x39", "%p", (void *)57ULL);
296 result |= test(__LINE__, "0x39", "%p", (void *)57U);
298 result |= test(__LINE__, "f", "%.1s", "foo");
299 result |= test(__LINE__, "f", "%.*s", 1, "foo");
300 result |= test(__LINE__, "foo ", "%*s", -5, "foo");
302 result |= test(__LINE__, "hello", "hello");
304 result |= test(__LINE__, "%b", "%b");
307 result |= test(__LINE__, " a", "%3c", 'a');
309 result |= test(__LINE__, "1234", "%3d", 1234);
311 result |= test(__LINE__, "2", "%-1d", 2);
313 result |= test(__LINE__, "8.6000", "%2.4f", printf_float(8.6));
314 result |= test(__LINE__, "0.600000", "%0f", printf_float(0.6));
315 result |= test(__LINE__, "1", "%.0f", printf_float(0.6));
316 result |= test(__LINE__, "0", "%.0f", printf_float(0.45));
317 result |= test(__LINE__, "8.6000e+00", "%2.4e", printf_float(8.6));
318 result |= test(__LINE__, " 8.6000e+00", "% 2.4e", printf_float(8.6));
319 result |= test(__LINE__, "-8.6000e+00", "% 2.4e", printf_float(-8.6));
320 result |= test(__LINE__, "+8.6000e+00", "%+2.4e", printf_float(8.6));
321 result |= test(__LINE__, "8.6", "%2.4g", printf_float(8.6));
323 result |= test(__LINE__, "-1", "%-i", -1);
324 result |= test(__LINE__, "1", "%-i", 1);
326 result |= test(__LINE__, "+1", "%+i", 1);
328 result |= test(__LINE__, "12", "%o", 10);
332 result |= test(__LINE__, "(null)", "%s", NULL);
334 result |= test(__LINE__, "%%%%", "%s", "%%%%");
335 result |= test(__LINE__, I("4294967295", "65535"), "%u", -1);
337 result |= test(__LINE__, "%w", "%w", -1);
343 result |= test(__LINE__, "%H", "%H", -1);
345 result |= test(__LINE__, "%0", "%%0");
346 result |= test(__LINE__, "2345", "%hx", 74565);
348 result |= test(__LINE__, "61", "%hhx", 0x61);
349 result |= test(__LINE__, "61", "%hhx", 0x161);
350 result |= test(__LINE__, "97", "%hhd", 0x61);
351 result |= test(__LINE__, "97", "%hhd", 0x161);
352 result |= test(__LINE__, "-97", "%hhd", -0x61);
353 result |= test(__LINE__, "-97", "%hhd", -0x161);
355 result |= test(__LINE__, "Hallo heimur", "Hallo heimur");
356 result |= test(__LINE__, "Hallo heimur", "%s", "Hallo heimur");
357 result |= test(__LINE__, "1024", "%d", 1024);
358 result |= test(__LINE__, "-1024", "%d", -1024);
359 result |= test(__LINE__, "1024", "%i", 1024);
360 result |= test(__LINE__, "-1024", "%i", -1024);
361 result |= test(__LINE__, "1024", "%u", 1024);
362 result |= test(__LINE__, I("4294966272", "64512"), "%u", 4294966272U);
363 result |= test(__LINE__, "777", "%o", 511);
364 result |= test(__LINE__, I("37777777001", "177001"), "%o", 4294966785U);
365 result |= test(__LINE__, I("1234abcd", "abcd"), "%x", 305441741);
366 result |= test(__LINE__, I("edcb5433", "5433"), "%x", 3989525555U);
367 result |= test(__LINE__, I("1234ABCD", "ABCD"), "%X", 305441741);
368 result |= test(__LINE__, I("EDCB5433", "5433"), "%X", 3989525555U);
370 … result |= test(__LINE__, I("10010001101001010101111001101", "1010101111001101"), "%b", 305441741);
371 …result |= test(__LINE__, I("11101101110010110101010000110011", "101010000110011"), "%b", 398952555…
372 … result |= test(__LINE__, I("10010001101001010101111001101", "1010101111001101"), "%B", 305441741);
373 …result |= test(__LINE__, I("11101101110010110101010000110011", "101010000110011"), "%B", 398952555…
375 result |= test(__LINE__, "x", "%c", 'x');
376 result |= test(__LINE__, "%", "%%");
377 result |= test(__LINE__, "Hallo heimur", "%+s", "Hallo heimur");
379 result |= test(__LINE__, "+1024", "%+d", 1024);
381 result |= test(__LINE__, "-1024", "%+d", -1024);
383 result |= test(__LINE__, "+1024", "%+i", 1024);
385 result |= test(__LINE__, "-1024", "%+i", -1024);
386 result |= test(__LINE__, "1024", "%+u", 1024);
387 result |= test(__LINE__, I("4294966272", "64512"), "%+u", 4294966272U);
388 result |= test(__LINE__, "777", "%+o", 511);
389 result |= test(__LINE__, I("37777777001", "177001"), "%+o", 4294966785U);
390 result |= test(__LINE__, I("1234abcd", "abcd"), "%+x", 305441741);
391 result |= test(__LINE__, I("edcb5433", "5433"), "%+x", 3989525555U);
392 result |= test(__LINE__, I("1234ABCD", "ABCD"), "%+X", 305441741);
393 result |= test(__LINE__, I("EDCB5433", "5433"), "%+X", 3989525555U);
394 result |= test(__LINE__, "x", "%+c", 'x');
395 result |= test(__LINE__, "Hallo heimur", "% s", "Hallo heimur");
397 result |= test(__LINE__, " 1024", "% d", 1024);
399 result |= test(__LINE__, "-1024", "% d", -1024);
401 result |= test(__LINE__, " 1024", "% i", 1024);
403 result |= test(__LINE__, "-1024", "% i", -1024);
404 result |= test(__LINE__, "1024", "% u", 1024);
405 result |= test(__LINE__, I("4294966272", "64512"), "% u", 4294966272U);
406 result |= test(__LINE__, "777", "% o", 511);
407 result |= test(__LINE__, I("37777777001", "177001"), "% o", 4294966785U);
408 result |= test(__LINE__, I("1234abcd", "abcd"), "% x", 305441741);
409 result |= test(__LINE__, I("edcb5433", "5433"), "% x", 3989525555U);
410 result |= test(__LINE__, I("1234ABCD", "ABCD"), "% X", 305441741);
411 result |= test(__LINE__, I("EDCB5433", "5433"), "% X", 3989525555U);
412 result |= test(__LINE__, "x", "% c", 'x');
413 result |= test(__LINE__, "Hallo heimur", "%+ s", "Hallo heimur");
415 result |= test(__LINE__, "+1024", "%+ d", 1024);
417 result |= test(__LINE__, "-1024", "%+ d", -1024);
419 result |= test(__LINE__, "+1024", "%+ i", 1024);
421 result |= test(__LINE__, "-1024", "%+ i", -1024);
422 result |= test(__LINE__, "1024", "%+ u", 1024);
423 result |= test(__LINE__, I("4294966272", "64512"), "%+ u", 4294966272U);
424 result |= test(__LINE__, "777", "%+ o", 511);
425 result |= test(__LINE__, I("37777777001", "177001"), "%+ o", 4294966785U);
426 result |= test(__LINE__, I("1234abcd", "abcd"), "%+ x", 305441741);
427 result |= test(__LINE__, I("edcb5433", "5433"), "%+ x", 3989525555U);
428 result |= test(__LINE__, I("1234ABCD", "ABCD"), "%+ X", 305441741);
429 result |= test(__LINE__, I("EDCB5433", "5433"), "%+ X", 3989525555U);
430 result |= test(__LINE__, "x", "%+ c", 'x');
431 result |= test(__LINE__, "0777", "%#o", 511);
432 result |= test(__LINE__, I("037777777001", "0177001"), "%#o", 4294966785U);
433 result |= test(__LINE__, I("0x1234abcd", "0xabcd"), "%#x", 305441741);
434 result |= test(__LINE__, I("0xedcb5433", "0x5433"), "%#x", 3989525555U);
436 result |= test(__LINE__, I("0X1234ABCD", "0XABCD"), "%#X", 305441741);
437 result |= test(__LINE__, I("0XEDCB5433", "0X5433"), "%#X", 3989525555U);
440 …result |= test(__LINE__, I("0b10010001101001010101111001101", "0b1010101111001101"), "%#b", 305441…
441 …result |= test(__LINE__, I("0b11101101110010110101010000110011", "0b101010000110011"), "%#b", 3989…
442 …result |= test(__LINE__, I("0B10010001101001010101111001101", "0B1010101111001101"), "%#B", 305441…
443 …result |= test(__LINE__, I("0B11101101110010110101010000110011", "0B101010000110011"), "%#B", 3989…
445 result |= test(__LINE__, "0", "%#o", 0U);
446 result |= test(__LINE__, "0", "%#x", 0U);
447 result |= test(__LINE__, "0", "%#X", 0U);
448 result |= test(__LINE__, "Hallo heimur", "%1s", "Hallo heimur");
449 result |= test(__LINE__, "1024", "%1d", 1024);
450 result |= test(__LINE__, "-1024", "%1d", -1024);
451 result |= test(__LINE__, "1024", "%1i", 1024);
452 result |= test(__LINE__, "-1024", "%1i", -1024);
453 result |= test(__LINE__, "1024", "%1u", 1024);
454 result |= test(__LINE__, I("4294966272", "64512"), "%1u", 4294966272U);
455 result |= test(__LINE__, "777", "%1o", 511);
456 result |= test(__LINE__, I("37777777001", "177001"), "%1o", 4294966785U);
457 result |= test(__LINE__, I("1234abcd", "abcd"), "%1x", 305441741);
458 result |= test(__LINE__, I("edcb5433", "5433"), "%1x", 3989525555U);
459 result |= test(__LINE__, I("1234ABCD", "ABCD"), "%1X", 305441741);
460 result |= test(__LINE__, I("EDCB5433", "5433"), "%1X", 3989525555U);
461 result |= test(__LINE__, "x", "%1c", 'x');
463 result |= test(__LINE__, " Hallo", "%20s", "Hallo");
464 result |= test(__LINE__, " 1024", "%20d", 1024);
465 result |= test(__LINE__, " -1024", "%20d", -1024);
466 result |= test(__LINE__, " 1024", "%20i", 1024);
467 result |= test(__LINE__, " -1024", "%20i", -1024);
468 result |= test(__LINE__, " 1024", "%20u", 1024);
469 … result |= test(__LINE__, I(" 4294966272", " 64512"), "%20u", 4294966272U);
470 result |= test(__LINE__, " 777", "%20o", 511);
471 … result |= test(__LINE__, I(" 37777777001", " 177001"), "%20o", 4294966785U);
472 result |= test(__LINE__, I(" 1234abcd", " abcd"), "%20x", 305441741);
473 … result |= test(__LINE__, I(" edcb5433", " 5433"), "%20x", 3989525555U);
474 result |= test(__LINE__, I(" 1234ABCD", " ABCD"), "%20X", 305441741);
475 … result |= test(__LINE__, I(" EDCB5433", " 5433"), "%20X", 3989525555U);
476 result |= test(__LINE__, " x", "%20c", 'x');
477 result |= test(__LINE__, "Hallo ", "%-20s", "Hallo");
478 result |= test(__LINE__, "1024 ", "%-20d", 1024);
479 result |= test(__LINE__, "-1024 ", "%-20d", -1024);
480 result |= test(__LINE__, "1024 ", "%-20i", 1024);
481 result |= test(__LINE__, "-1024 ", "%-20i", -1024);
482 result |= test(__LINE__, "1024 ", "%-20u", 1024);
483 … result |= test(__LINE__, I("4294966272 ", "64512 "), "%-20u", 4294966272U);
484 result |= test(__LINE__, "777 ", "%-20o", 511);
485 … result |= test(__LINE__, I("37777777001 ", "177001 "), "%-20o", 4294966785U);
486 result |= test(__LINE__, I("1234abcd ", "abcd "), "%-20x", 305441741);
487 … result |= test(__LINE__, I("edcb5433 ", "5433 "), "%-20x", 3989525555U);
488 result |= test(__LINE__, I("1234ABCD ", "ABCD "), "%-20X", 305441741);
489 … result |= test(__LINE__, I("EDCB5433 ", "5433 "), "%-20X", 3989525555U);
490 result |= test(__LINE__, "x ", "%-20c", 'x');
491 result |= test(__LINE__, "00000000000000001024", "%020d", 1024);
492 result |= test(__LINE__, "-0000000000000001024", "%020d", -1024);
493 result |= test(__LINE__, "00000000000000001024", "%020i", 1024);
494 result |= test(__LINE__, "-0000000000000001024", "%020i", -1024);
495 result |= test(__LINE__, "00000000000000001024", "%020u", 1024);
496 … result |= test(__LINE__, I("00000000004294966272", "00000000000000064512"), "%020u", 4294966272U);
497 result |= test(__LINE__, "00000000000000000777", "%020o", 511);
498 … result |= test(__LINE__, I("00000000037777777001", "00000000000000177001"), "%020o", 4294966785U);
499 result |= test(__LINE__, I("0000000000001234abcd", "0000000000000000abcd"), "%020x", 305441741);
500 … result |= test(__LINE__, I("000000000000edcb5433", "00000000000000005433"), "%020x", 3989525555U);
501 result |= test(__LINE__, I("0000000000001234ABCD", "0000000000000000ABCD"), "%020X", 305441741);
502 … result |= test(__LINE__, I("000000000000EDCB5433", "00000000000000005433"), "%020X", 3989525555U);
503 result |= test(__LINE__, " 0777", "%#20o", 511);
504 … result |= test(__LINE__, I(" 037777777001", " 0177001"), "%#20o", 4294966785U);
505 result |= test(__LINE__, I(" 0x1234abcd", " 0xabcd"), "%#20x", 305441741);
506 … result |= test(__LINE__, I(" 0xedcb5433", " 0x5433"), "%#20x", 3989525555U);
507 result |= test(__LINE__, I(" 0X1234ABCD", " 0XABCD"), "%#20X", 305441741);
508 … result |= test(__LINE__, I(" 0XEDCB5433", " 0X5433"), "%#20X", 3989525555U);
509 result |= test(__LINE__, "00000000000000000777", "%#020o", 511);
510 …result |= test(__LINE__, I("00000000037777777001", "00000000000000177001"), "%#020o", 4294966785U);
511 … result |= test(__LINE__, I("0x00000000001234abcd", "0x00000000000000abcd"), "%#020x", 305441741);
512 …result |= test(__LINE__, I("0x0000000000edcb5433", "0x000000000000005433"), "%#020x", 3989525555U);
513 … result |= test(__LINE__, I("0X00000000001234ABCD", "0X00000000000000ABCD"), "%#020X", 305441741);
514 …result |= test(__LINE__, I("0X0000000000EDCB5433", "0X000000000000005433"), "%#020X", 3989525555U);
515 result |= test(__LINE__, "Hallo ", "%0-20s", "Hallo");
516 result |= test(__LINE__, "1024 ", "%0-20d", 1024);
517 result |= test(__LINE__, "-1024 ", "%0-20d", -1024);
518 result |= test(__LINE__, "1024 ", "%0-20i", 1024);
519 result |= test(__LINE__, "-1024 ", "%0-20i", -1024);
520 result |= test(__LINE__, "1024 ", "%0-20u", 1024);
521 …result |= test(__LINE__, I("4294966272 ", "64512 "), "%0-20u", 4294966272U);
522 result |= test(__LINE__, "777 ", "%-020o", 511);
523 …result |= test(__LINE__, I("37777777001 ", "177001 "), "%-020o", 4294966785U);
524 … result |= test(__LINE__, I("1234abcd ", "abcd "), "%-020x", 305441741);
525 …result |= test(__LINE__, I("edcb5433 ", "5433 "), "%-020x", 3989525555U);
526 … result |= test(__LINE__, I("1234ABCD ", "ABCD "), "%-020X", 305441741);
527 …result |= test(__LINE__, I("EDCB5433 ", "5433 "), "%-020X", 3989525555U);
528 result |= test(__LINE__, "x ", "%-020c", 'x');
529 result |= test(__LINE__, " Hallo", "%*s", 20, "Hallo");
530 result |= test(__LINE__, " 1024", "%*d", 20, 1024);
531 result |= test(__LINE__, " -1024", "%*d", 20, -1024);
532 result |= test(__LINE__, " 1024", "%*i", 20, 1024);
533 result |= test(__LINE__, " -1024", "%*i", 20, -1024);
534 result |= test(__LINE__, " 1024", "%*u", 20, 1024);
535 …result |= test(__LINE__, I(" 4294966272", " 64512"), "%*u", 20, 4294966272U…
536 result |= test(__LINE__, " 777", "%*o", 20, 511);
537 …result |= test(__LINE__, I(" 37777777001", " 177001"), "%*o", 20, 4294966785U…
538 … result |= test(__LINE__, I(" 1234abcd", " abcd"), "%*x", 20, 305441741);
539 …result |= test(__LINE__, I(" edcb5433", " 5433"), "%*x", 20, 3989525555U…
540 … result |= test(__LINE__, I(" 1234ABCD", " ABCD"), "%*X", 20, 305441741);
541 …result |= test(__LINE__, I(" EDCB5433", " 5433"), "%*X", 20, 3989525555U…
542 result |= test(__LINE__, " x", "%*c", 20, 'x');
543 result |= test(__LINE__, "Hallo heimur", "%.20s", "Hallo heimur");
544 result |= test(__LINE__, "00000000000000001024", "%.20d", 1024);
545 result |= test(__LINE__, "-00000000000000001024", "%.20d", -1024);
546 result |= test(__LINE__, "00000000000000001024", "%.20i", 1024);
547 result |= test(__LINE__, "-00000000000000001024", "%.20i", -1024);
548 result |= test(__LINE__, "00000000000000001024", "%.20u", 1024);
549 … result |= test(__LINE__, I("00000000004294966272", "00000000000000064512"), "%.20u", 4294966272U);
550 result |= test(__LINE__, "00000000000000000777", "%.20o", 511);
551 … result |= test(__LINE__, I("00000000037777777001", "00000000000000177001"), "%.20o", 4294966785U);
552 result |= test(__LINE__, I("0000000000001234abcd", "0000000000000000abcd"), "%.20x", 305441741);
553 … result |= test(__LINE__, I("000000000000edcb5433", "00000000000000005433"), "%.20x", 3989525555U);
554 result |= test(__LINE__, I("0000000000001234ABCD", "0000000000000000ABCD"), "%.20X", 305441741);
555 … result |= test(__LINE__, I("000000000000EDCB5433", "00000000000000005433"), "%.20X", 3989525555U);
556 result |= test(__LINE__, " Hallo", "%20.5s", "Hallo heimur");
557 result |= test(__LINE__, " 01024", "%20.5d", 1024);
558 result |= test(__LINE__, " -01024", "%20.5d", -1024);
559 result |= test(__LINE__, " 01024", "%20.5i", 1024);
560 result |= test(__LINE__, " -01024", "%20.5i", -1024);
561 result |= test(__LINE__, " 01024", "%20.5u", 1024);
562 …result |= test(__LINE__, I(" 4294966272", " 64512"), "%20.5u", 4294966272U);
563 result |= test(__LINE__, " 00777", "%20.5o", 511);
564 …result |= test(__LINE__, I(" 37777777001", " 177001"), "%20.5o", 4294966785U);
565 … result |= test(__LINE__, I(" 1234abcd", " 0abcd"), "%20.5x", 305441741);
566 …result |= test(__LINE__, I(" 00edcb5433", " 0000005433"), "%20.10x", 3989525555U…
567 … result |= test(__LINE__, I(" 1234ABCD", " 0ABCD"), "%20.5X", 305441741);
568 …result |= test(__LINE__, I(" 00EDCB5433", " 0000005433"), "%20.10X", 3989525555U…
569 result |= test(__LINE__, " 01024", "%020.5d", 1024);
570 result |= test(__LINE__, " -01024", "%020.5d", -1024);
571 result |= test(__LINE__, " 01024", "%020.5i", 1024);
572 result |= test(__LINE__, " -01024", "%020.5i", -1024);
573 result |= test(__LINE__, " 01024", "%020.5u", 1024);
574 …result |= test(__LINE__, I(" 4294966272", " 64512"), "%020.5u", 4294966272U…
575 result |= test(__LINE__, " 00777", "%020.5o", 511);
576 …result |= test(__LINE__, I(" 37777777001", " 177001"), "%020.5o", 4294966785U…
577 … result |= test(__LINE__, I(" 1234abcd", " 0abcd"), "%020.5x", 305441741);
578 …result |= test(__LINE__, I(" 00edcb5433", " 0000005433"), "%020.10x", 3989525555…
579 … result |= test(__LINE__, I(" 1234ABCD", " 0ABCD"), "%020.5X", 305441741);
580 …result |= test(__LINE__, I(" 00EDCB5433", " 0000005433"), "%020.10X", 3989525555…
581 result |= test(__LINE__, "", "%.0s", "Hallo heimur");
582 result |= test(__LINE__, " ", "%20.0s", "Hallo heimur");
583 result |= test(__LINE__, "", "%.s", "Hallo heimur");
584 result |= test(__LINE__, " ", "%20.s", "Hallo heimur");
585 result |= test(__LINE__, " 1024", "%20.0d", 1024);
586 result |= test(__LINE__, " -1024", "%20.d", -1024);
587 result |= test(__LINE__, " ", "%20.d", 0);
588 result |= test(__LINE__, " 1024", "%20.0i", 1024);
589 result |= test(__LINE__, " -1024", "%20.i", -1024);
590 result |= test(__LINE__, " ", "%20.i", 0);
591 result |= test(__LINE__, " 1024", "%20.u", 1024);
592 …result |= test(__LINE__, I(" 4294966272", " 64512") , "%20.0u", 4294966272U…
593 result |= test(__LINE__, " ", "%20.u", 0U);
594 result |= test(__LINE__, " 777", "%20.o", 511);
595 …result |= test(__LINE__, I(" 37777777001", " 177001"), "%20.0o", 4294966785U);
596 result |= test(__LINE__, " ", "%20.o", 0U);
597 result |= test(__LINE__, I(" 1234abcd", " abcd"), "%20.x", 305441741);
598 …result |= test(__LINE__, I(" edcb5433", " 5433"), "%20.0x", 3989525555U);
599 result |= test(__LINE__, " ", "%20.x", 0U);
600 result |= test(__LINE__, I(" 1234ABCD", " ABCD"), "%20.X", 305441741);
601 …result |= test(__LINE__, I(" EDCB5433", " 5433"), "%20.0X", 3989525555U);
602 result |= test(__LINE__, " ", "%20.X", 0U);
603 result |= test(__LINE__, "Hallo ", "% -0+*.*s", 20, 5, "Hallo heimur");
604 result |= test(__LINE__, "+01024 ", "% -0+*.*d", 20, 5, 1024);
605 result |= test(__LINE__, "-01024 ", "% -0+*.*d", 20, 5, -1024);
606 result |= test(__LINE__, "+01024 ", "% -0+*.*i", 20, 5, 1024);
607 result |= test(__LINE__, "-01024 ", "% 0-+*.*i", 20, 5, -1024);
608 result |= test(__LINE__, "01024 ", "% 0-+*.*u", 20, 5, 1024);
609 …result |= test(__LINE__, I("4294966272 ", "64512 "), "% 0-+*.*u", 20, 5, 42…
610 result |= test(__LINE__, "00777 ", "%+ -0*.*o", 20, 5, 511);
611 …result |= test(__LINE__, I("37777777001 ", "177001 "), "%+ -0*.*o", 20, 5, 42…
612 …result |= test(__LINE__, I("1234abcd ", "0abcd "), "%+ -0*.*x", 20, 5, 30…
613 …result |= test(__LINE__, I("00edcb5433 ", "0000005433 "), "%+ -0*.*x", 20, 10, 3…
614 …result |= test(__LINE__, I("1234ABCD ", "0ABCD "), "% -+0*.*X", 20, 5, 30…
615 …result |= test(__LINE__, I("00EDCB5433 ", "0000005433 "), "% -+0*.*X", 20, 10, 3…
616 result |= test(__LINE__, "hi x", "%*sx", -3, "hi");
619 result |= test(__LINE__, "1.000e-38", "%.3e", printf_float(1e-38));
621 result |= test(__LINE__, "1.000e-308", "%.3e", printf_float(1e-308));
626 result |= test(__LINE__, "1, 1", "%-*.llu, %-*.llu",1,1ULL,1,1ULL);
630 result |= test(__LINE__, "1e-09", "%g", printf_float(0.000000001));
631 result |= test(__LINE__, "1e-08", "%g", printf_float(0.00000001));
632 result |= test(__LINE__, "1e-07", "%g", printf_float(0.0000001));
633 result |= test(__LINE__, "1e-06", "%g", printf_float(0.000001));
634 result |= test(__LINE__, "0.0001", "%g", printf_float(0.0001));
635 result |= test(__LINE__, "0.001", "%g", printf_float(0.001));
636 result |= test(__LINE__, "0.01", "%g", printf_float(0.01));
637 result |= test(__LINE__, "0.1", "%g", printf_float(0.1));
638 result |= test(__LINE__, "1", "%g", printf_float(1.0));
639 result |= test(__LINE__, "10", "%g", printf_float(10.0));
640 result |= test(__LINE__, "100", "%g", printf_float(100.0));
641 result |= test(__LINE__, "1000", "%g", printf_float(1000.0));
642 result |= test(__LINE__, "10000", "%g", printf_float(10000.0));
643 result |= test(__LINE__, "100000", "%g", printf_float(100000.0));
644 result |= test(__LINE__, "1e+06", "%g", printf_float(1000000.0));
645 result |= test(__LINE__, "1e+07", "%g", printf_float(10000000.0));
646 result |= test(__LINE__, "1e+08", "%g", printf_float(100000000.0));
647 result |= test(__LINE__, "10.0000", "%#.6g", printf_float(10.0));
648 result |= test(__LINE__, "10", "%.6g", printf_float(10.0));
649 result |= test(__LINE__, "10.00000000000000000000", "%#.22g", printf_float(10.0));
656 result |= test(__LINE__, "", "%.*s", 0, "123456");
657 result |= test(__LINE__, "1234", "%.*s", 4, "123456");
658 result |= test(__LINE__, "123456", "%.*s", -4, "123456");
659 result |= test(__LINE__, "42", "%.*d", 0, 42);
660 result |= test(__LINE__, "000042", "%.*d", 6, 42);
661 result |= test(__LINE__, "42", "%.*d", -6, 42);
664 result |= test(__LINE__, "0", "%.*f", 0, printf_float(0.123));
665 result |= test(__LINE__, "0.1", "%.*f", 1, printf_float(0.123));
666 result |= test(__LINE__, "0.123000", "%.*f", -1, printf_float(0.123));
676 result |= test(__LINE__, " 42", "%4jd", (intmax_t)42L);
678 result |= test(__LINE__, "64", "%zu", sizeof c);
679 result |= test(__LINE__, "12", "%td", (c+12) - c);
684 result |= test(__LINE__, "0x1p+0", "%a", printf_float(0x1p+0));
685 result |= test(__LINE__, "0x0p+0", "%a", printf_float(0.0));
686 result |= test(__LINE__, "-0x0p+0", "%a", printf_float(-0.0));
687 result |= test(__LINE__, "0x1.9p+4", "%.1a", printf_float(0x1.89p+4));
688 result |= test(__LINE__, "0x1.8p+4", "%.1a", printf_float(0x1.88p+4));
689 result |= test(__LINE__, "0x1.8p+4", "%.1a", printf_float(0x1.78p+4));
690 result |= test(__LINE__, "0x1.7p+4", "%.1a", printf_float(0x1.77p+4));
691 result |= test(__LINE__, "0x1.fffffep+126", "%a", printf_float(0x1.fffffep+126f));
692 result |= test(__LINE__, "0x1.234564p-126", "%a", printf_float(0x1.234564p-126f));
693 result |= test(__LINE__, "0x1.234566p-126", "%a", printf_float(0x1.234566p-126f));
694 result |= test(__LINE__, "0X1.FFFFFEP+126", "%A", printf_float(0x1.fffffep+126f));
695 result |= test(__LINE__, "0X1.234564P-126", "%A", printf_float(0x1.234564p-126f));
696 result |= test(__LINE__, "0X1.234566P-126", "%A", printf_float(0x1.234566p-126f));
697 result |= test(__LINE__, "0x1.6p+1", "%.1a", printf_float(0x1.6789ap+1f));
698 result |= test(__LINE__, "0x1.68p+1", "%.2a", printf_float(0x1.6789ap+1f));
699 result |= test(__LINE__, "0x1.679p+1", "%.3a", printf_float(0x1.6789ap+1f));
700 result |= test(__LINE__, "0x1.678ap+1", "%.4a", printf_float(0x1.6789ap+1f));
701 result |= test(__LINE__, "0x1.6789ap+1", "%.5a", printf_float(0x1.6789ap+1f));
702 result |= test(__LINE__, "0x1.6789a0p+1", "%.6a", printf_float(0x1.6789ap+1f));
703 result |= test(__LINE__, "0x1.ffp+1", "%.2a", printf_float(0x1.ffp+1f));
704 result |= test(__LINE__, "0x2.0p+1", "%.1a", printf_float(0x1.ffp+1f));
705 result |= test(__LINE__, "0x2p+4", "%.a", printf_float(24.0));
706 result |= test(__LINE__, "0X2P+4", "%.A", printf_float(24.0));
707 result |= test(__LINE__, "nan", "%a", printf_float(NAN));
708 result |= test(__LINE__, "-nan", "%a", printf_float(-(FLOAT) NAN));
709 result |= test(__LINE__, "inf", "%a", printf_float(INFINITY));
710 result |= test(__LINE__, "-inf", "%a", printf_float(-INFINITY));
711 result |= test(__LINE__, "NAN", "%A", printf_float(NAN));
712 result |= test(__LINE__, "-NAN", "%A", printf_float(-(FLOAT) NAN));
713 result |= test(__LINE__, "INF", "%A", printf_float(INFINITY));
714 result |= test(__LINE__, "-INF", "%A", printf_float(-(FLOAT) INFINITY));
723 result |= test(__LINE__, "0x8p-3", "%La", 0x1p+0l);
724 result |= test(__LINE__, "0x0p+0", "%La", 0x0p+0l);
725 result |= test(__LINE__, "-0x0p+0", "%La", -0x0p+0l);
726 result |= test(__LINE__, "0xc.4p+1", "%.1La", 0x1.89p+4l);
727 result |= test(__LINE__, "0xc.4p+1", "%.1La", 0x1.88p+4l);
728 result |= test(__LINE__, "0xb.cp+1", "%.1La", 0x1.78p+4l);
729 result |= test(__LINE__, "0xb.cp+1", "%.1La", 0x1.77p+4l);
730 result |= test(__LINE__, "0xf.fffffp+123", "%La", 0x1.fffffep+126l);
731 result |= test(__LINE__, "0x9.1a2b2p-129", "%La", 0x1.234564p-126l);
732 result |= test(__LINE__, "0x9.1a2b3p-129", "%La", 0x1.234566p-126l);
733 result |= test(__LINE__, "0XF.FFFFFP+123", "%LA", 0X1.FFFFFEP+126l);
734 result |= test(__LINE__, "0X9.1A2B2P-129", "%LA", 0X1.234564P-126l);
735 result |= test(__LINE__, "0X9.1A2B3P-129", "%LA", 0X1.234566P-126l);
736 result |= test(__LINE__, "0xb.4p-2", "%.1La", 0x1.6789ap+1l);
737 result |= test(__LINE__, "0xb.3cp-2", "%.2La", 0x1.6789ap+1l);
738 result |= test(__LINE__, "0xb.3c5p-2", "%.3La", 0x1.6789ap+1l);
739 result |= test(__LINE__, "0xb.3c4dp-2", "%.4La", 0x1.6789ap+1l);
740 result |= test(__LINE__, "0xb.3c4d0p-2", "%.5La", 0x1.6789ap+1l);
741 result |= test(__LINE__, "0xb.3c4d00p-2", "%.6La", 0x1.6789ap+1l);
742 result |= test(__LINE__, "0xf.f8p-2", "%.2La", 0x1.ffp+1l);
743 result |= test(__LINE__, "0x1.0p+2", "%.1La", 0x1.ffp+1l);
744 result |= test(__LINE__, "0xcp+1", "%.La", 24.0l);
745 result |= test(__LINE__, "0XCP+1", "%.LA", 24.0l);
747 result |= test(__LINE__, "0x1p+0", "%La", (long double) 0x1p+0l);
748 result |= test(__LINE__, "0x0p+0", "%La", 0.0L);
749 result |= test(__LINE__, "-0x0p+0", "%La", -0.0L);
750 result |= test(__LINE__, "0x1.9p+4", "%.1La", 0x1.89p+4L);
751 result |= test(__LINE__, "0x1.8p+4", "%.1La", 0x1.88p+4L);
752 result |= test(__LINE__, "0x1.8p+4", "%.1La", 0x1.78p+4L);
753 result |= test(__LINE__, "0x1.7p+4", "%.1La", 0x1.77p+4L);
754 result |= test(__LINE__, "0x1.fffffep+126", "%La", (long double) 0x1.fffffep+126);
755 result |= test(__LINE__, "0x1.234564p-126", "%La", (long double) 0x1.234564p-126);
756 result |= test(__LINE__, "0x1.234566p-126", "%La", (long double) 0x1.234566p-126);
757 result |= test(__LINE__, "0X1.FFFFFEP+126", "%LA", (long double) 0x1.fffffep+126);
758 result |= test(__LINE__, "0X1.234564P-126", "%LA", (long double) 0x1.234564p-126);
759 result |= test(__LINE__, "0X1.234566P-126", "%LA", (long double) 0x1.234566p-126);
760 result |= test(__LINE__, "0x1.6p+1", "%.1La", (long double) 0x1.6789ap+1);
761 result |= test(__LINE__, "0x1.68p+1", "%.2La", (long double) 0x1.6789ap+1);
762 result |= test(__LINE__, "0x1.679p+1", "%.3La", (long double) 0x1.6789ap+1);
763 result |= test(__LINE__, "0x1.678ap+1", "%.4La", (long double) 0x1.6789ap+1);
764 result |= test(__LINE__, "0x1.6789ap+1", "%.5La", (long double) 0x1.6789ap+1);
765 result |= test(__LINE__, "0x1.6789a0p+1", "%.6La", (long double) 0x1.6789ap+1);
766 result |= test(__LINE__, "0x1.ffp+1", "%.2La", (long double) 0x1.ffp+1);
767 result |= test(__LINE__, "0x2.0p+1", "%.1La", (long double) 0x1.ffp+1);
768 result |= test(__LINE__, "0x2p+4", "%.La", 24.0L);
769 result |= test(__LINE__, "0X2P+4", "%.LA", 24.0L);
771 result |= test(__LINE__, "nan", "%La", (long double) NAN);
772 result |= test(__LINE__, "-nan", "%La", (long double) -NAN);
773 result |= test(__LINE__, "inf", "%La", (long double) INFINITY);
774 result |= test(__LINE__, "-inf", "%La", (long double) -INFINITY);
775 result |= test(__LINE__, "NAN", "%LA", (long double) NAN);
776 result |= test(__LINE__, "-NAN", "%LA", (long double) -NAN);
777 result |= test(__LINE__, "INF", "%LA", (long double) INFINITY);
778 result |= test(__LINE__, "-INF", "%LA", (long double) -INFINITY);
782 result |= test(__LINE__, "0x1p-149", "%a", printf_float(0x1p-149));
783 result |= test(__LINE__, "0x1p-127", "%.a", printf_float(0x1p-127));
785 result |= test(__LINE__, "0x0.000002p-126", "%a", printf_float(0x1p-149));
786 result |= test(__LINE__, "0x0p-126", "%.a", printf_float(0x1p-127));
789 result |= test(__LINE__, "0x1.306efbp-98", "%a", printf_float(3752432815e-39));
792 result |= test(__LINE__, "0x1p-1074", "%a", printf_float(0x1p-1074));
793 result |= test(__LINE__, "0x1p-1023", "%.a", printf_float(0x1p-1023));
796 result |= test(__LINE__, "0x0.0000000000001p-1022", "%a", printf_float(0x1p-1074));
797 result |= test(__LINE__, "0x0p-1022", "%.a", printf_float(0x1p-1023));
799 … result |= test(__LINE__, "0x1.fffffffffffffp+1022", "%a", printf_float(0x1.fffffffffffffp+1022));
800 … result |= test(__LINE__, "0x1.23456789abcdep-1022", "%a", printf_float(0x1.23456789abcdep-1022));
801 … result |= test(__LINE__, "0x1.23456789abcdfp-1022", "%a", printf_float(0x1.23456789abcdfp-1022));
802 … result |= test(__LINE__, "0X1.FFFFFFFFFFFFFP+1022", "%A", printf_float(0x1.fffffffffffffp+1022));
803 … result |= test(__LINE__, "0X1.23456789ABCDEP-1022", "%A", printf_float(0x1.23456789abcdep-1022));
804 … result |= test(__LINE__, "0X1.23456789ABCDFP-1022", "%A", printf_float(0x1.23456789abcdfp-1022));
805 result |= test(__LINE__, "0X1.D749096BB98C800P+8", "%.15A", printf_float(0x1.D749096BB98C8p+8));
826 result |= test(__LINE__, "$㌰$", "$%lc$", 0x3330);
829 result |= test(__LINE__, "foobar", "%ls", L"foobar");
830 result |= test(__LINE__, "$c$", "$%lc$", L'c');