Lines Matching refs:result

98       char *result;  in test_function()  local
99 int retval = asprintf (&result, "%d", 12345); in test_function()
101 ASSERT (result != NULL); in test_function()
102 ASSERT (strcmp (result, "12345") == 0); in test_function()
103 free (result); in test_function()
109 char *result; in test_function() local
111 my_asprintf (&result, "%ju %d", (uintmax_t) 12345671, 33, 44, 55); in test_function()
112 ASSERT (result != NULL); in test_function()
113 ASSERT (strcmp (result, "12345671 33") == 0); in test_function()
114 ASSERT (retval == strlen (result)); in test_function()
115 free (result); in test_function()
119 char *result; in test_function() local
121 my_asprintf (&result, "%zu %d", (size_t) 12345672, 33, 44, 55); in test_function()
122 ASSERT (result != NULL); in test_function()
123 ASSERT (strcmp (result, "12345672 33") == 0); in test_function()
124 ASSERT (retval == strlen (result)); in test_function()
125 free (result); in test_function()
129 char *result; in test_function() local
131 my_asprintf (&result, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55); in test_function()
132 ASSERT (result != NULL); in test_function()
133 ASSERT (strcmp (result, "12345673 33") == 0); in test_function()
134 ASSERT (retval == strlen (result)); in test_function()
135 free (result); in test_function()
139 char *result; in test_function() local
141 my_asprintf (&result, "%Lg %d", (long double) 1.5, 33, 44, 55); in test_function()
142 ASSERT (result != NULL); in test_function()
143 ASSERT (strcmp (result, "1.5 33") == 0); in test_function()
144 ASSERT (retval == strlen (result)); in test_function()
145 free (result); in test_function()
152 char *result; in test_function() local
154 my_asprintf (&result, "%a %d", 3.1416015625, 33, 44, 55); in test_function()
155 ASSERT (result != NULL); in test_function()
156 ASSERT (strcmp (result, "0x1.922p+1 33") == 0 in test_function()
157 || strcmp (result, "0x3.244p+0 33") == 0 in test_function()
158 || strcmp (result, "0x6.488p-1 33") == 0 in test_function()
159 || strcmp (result, "0xc.91p-2 33") == 0); in test_function()
160 ASSERT (retval == strlen (result)); in test_function()
161 free (result); in test_function()
165 char *result; in test_function() local
167 my_asprintf (&result, "%A %d", -3.1416015625, 33, 44, 55); in test_function()
168 ASSERT (result != NULL); in test_function()
169 ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 in test_function()
170 || strcmp (result, "-0X3.244P+0 33") == 0 in test_function()
171 || strcmp (result, "-0X6.488P-1 33") == 0 in test_function()
172 || strcmp (result, "-0XC.91P-2 33") == 0); in test_function()
173 ASSERT (retval == strlen (result)); in test_function()
174 free (result); in test_function()
178 char *result; in test_function() local
180 my_asprintf (&result, "%a %d", 0.0, 33, 44, 55); in test_function()
181 ASSERT (result != NULL); in test_function()
182 ASSERT (strcmp (result, "0x0p+0 33") == 0); in test_function()
183 ASSERT (retval == strlen (result)); in test_function()
184 free (result); in test_function()
188 char *result; in test_function() local
190 my_asprintf (&result, "%a %d", minus_zerod, 33, 44, 55); in test_function()
191 ASSERT (result != NULL); in test_function()
193 ASSERT (strcmp (result, "-0x0p+0 33") == 0); in test_function()
194 ASSERT (retval == strlen (result)); in test_function()
195 free (result); in test_function()
199 char *result; in test_function() local
201 my_asprintf (&result, "%a %d", Infinityd (), 33, 44, 55); in test_function()
202 ASSERT (result != NULL); in test_function()
203 ASSERT (strcmp (result, "inf 33") == 0); in test_function()
204 ASSERT (retval == strlen (result)); in test_function()
205 free (result); in test_function()
209 char *result; in test_function() local
211 my_asprintf (&result, "%a %d", - Infinityd (), 33, 44, 55); in test_function()
212 ASSERT (result != NULL); in test_function()
213 ASSERT (strcmp (result, "-inf 33") == 0); in test_function()
214 ASSERT (retval == strlen (result)); in test_function()
215 free (result); in test_function()
219 char *result; in test_function() local
221 my_asprintf (&result, "%a %d", NaNd (), 33, 44, 55); in test_function()
222 ASSERT (result != NULL); in test_function()
223 ASSERT (strlen (result) >= 3 + 3 in test_function()
224 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
225 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
226 ASSERT (retval == strlen (result)); in test_function()
227 free (result); in test_function()
231 char *result; in test_function() local
233 my_asprintf (&result, "%.0a %d", 1.5, 33, 44, 55); in test_function()
234 ASSERT (result != NULL); in test_function()
235 ASSERT (strcmp (result, "0x1p+0 33") == 0 in test_function()
236 || strcmp (result, "0x2p+0 33") == 0 in test_function()
237 || strcmp (result, "0x3p-1 33") == 0 in test_function()
238 || strcmp (result, "0x6p-2 33") == 0 in test_function()
239 || strcmp (result, "0xcp-3 33") == 0); in test_function()
240 ASSERT (retval == strlen (result)); in test_function()
241 free (result); in test_function()
245 char *result; in test_function() local
247 my_asprintf (&result, "%.0a %d", 1.51, 33, 44, 55); in test_function()
248 ASSERT (result != NULL); in test_function()
249 ASSERT (strcmp (result, "0x1p+0 33") == 0 in test_function()
250 || strcmp (result, "0x2p+0 33") == 0 in test_function()
251 || strcmp (result, "0x3p-1 33") == 0 in test_function()
252 || strcmp (result, "0x6p-2 33") == 0 in test_function()
253 || strcmp (result, "0xcp-3 33") == 0); in test_function()
254 ASSERT (retval == strlen (result)); in test_function()
255 free (result); in test_function()
259 char *result; in test_function() local
261 my_asprintf (&result, "%.1a %d", 1.51, 33, 44, 55); in test_function()
262 ASSERT (result != NULL); in test_function()
263 ASSERT (strcmp (result, "0x1.8p+0 33") == 0 in test_function()
264 || strcmp (result, "0x3.0p-1 33") == 0 in test_function()
265 || strcmp (result, "0x6.1p-2 33") == 0 in test_function()
266 || strcmp (result, "0xc.1p-3 33") == 0); in test_function()
267 ASSERT (retval == strlen (result)); in test_function()
268 free (result); in test_function()
272 char *result; in test_function() local
274 my_asprintf (&result, "%.2a %d", 1.51, 33, 44, 55); in test_function()
275 ASSERT (result != NULL); in test_function()
276 ASSERT (strcmp (result, "0x1.83p+0 33") == 0 in test_function()
277 || strcmp (result, "0x3.05p-1 33") == 0 in test_function()
278 || strcmp (result, "0x6.0ap-2 33") == 0 in test_function()
279 || strcmp (result, "0xc.14p-3 33") == 0); in test_function()
280 ASSERT (retval == strlen (result)); in test_function()
281 free (result); in test_function()
285 char *result; in test_function() local
287 my_asprintf (&result, "%.3a %d", 1.51, 33, 44, 55); in test_function()
288 ASSERT (result != NULL); in test_function()
289 ASSERT (strcmp (result, "0x1.829p+0 33") == 0 in test_function()
290 || strcmp (result, "0x3.052p-1 33") == 0 in test_function()
291 || strcmp (result, "0x6.0a4p-2 33") == 0 in test_function()
292 || strcmp (result, "0xc.148p-3 33") == 0); in test_function()
293 ASSERT (retval == strlen (result)); in test_function()
294 free (result); in test_function()
298 char *result; in test_function() local
300 my_asprintf (&result, "%.3a %d", 1.49999, 33, 44, 55); in test_function()
301 ASSERT (result != NULL); in test_function()
302 ASSERT (strcmp (result, "0x1.800p+0 33") == 0 in test_function()
303 || strcmp (result, "0x3.000p-1 33") == 0 in test_function()
304 || strcmp (result, "0x6.000p-2 33") == 0 in test_function()
305 || strcmp (result, "0xc.000p-3 33") == 0); in test_function()
306 ASSERT (retval == strlen (result)); in test_function()
307 free (result); in test_function()
312 char *result; in test_function() local
314 my_asprintf (&result, "%.1a %d", 1.999, 33, 44, 55); in test_function()
315 ASSERT (result != NULL); in test_function()
316 ASSERT (strcmp (result, "0x1.0p+1 33") == 0 in test_function()
317 || strcmp (result, "0x2.0p+0 33") == 0 in test_function()
318 || strcmp (result, "0x4.0p-1 33") == 0 in test_function()
319 || strcmp (result, "0x8.0p-2 33") == 0); in test_function()
320 ASSERT (retval == strlen (result)); in test_function()
321 free (result); in test_function()
325 char *result; in test_function() local
327 my_asprintf (&result, "%10a %d", 1.75, 33, 44, 55); in test_function()
328 ASSERT (result != NULL); in test_function()
329 ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 in test_function()
330 || strcmp (result, " 0x3.8p-1 33") == 0 in test_function()
331 || strcmp (result, " 0x7p-2 33") == 0 in test_function()
332 || strcmp (result, " 0xep-3 33") == 0); in test_function()
333 ASSERT (retval == strlen (result)); in test_function()
334 free (result); in test_function()
338 char *result; in test_function() local
340 my_asprintf (&result, "%.10a %d", 1.75, 33, 44, 55); in test_function()
341 ASSERT (result != NULL); in test_function()
342 ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 in test_function()
343 || strcmp (result, "0x3.8000000000p-1 33") == 0 in test_function()
344 || strcmp (result, "0x7.0000000000p-2 33") == 0 in test_function()
345 || strcmp (result, "0xe.0000000000p-3 33") == 0); in test_function()
346 ASSERT (retval == strlen (result)); in test_function()
347 free (result); in test_function()
351 char *result; in test_function() local
353 my_asprintf (&result, "%.50a %d", 1.75, 33, 44, 55); in test_function()
354 ASSERT (result != NULL); in test_function()
355 ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 in test_function()
356 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 in test_function()
357 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 in test_function()
358 … || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); in test_function()
359 ASSERT (retval == strlen (result)); in test_function()
360 free (result); in test_function()
364 char *result; in test_function() local
366 my_asprintf (&result, "%-10a %d", 1.75, 33, 44, 55); in test_function()
367 ASSERT (result != NULL); in test_function()
368 ASSERT (strcmp (result, "0x1.cp+0 33") == 0 in test_function()
369 || strcmp (result, "0x3.8p-1 33") == 0 in test_function()
370 || strcmp (result, "0x7p-2 33") == 0 in test_function()
371 || strcmp (result, "0xep-3 33") == 0); in test_function()
372 ASSERT (retval == strlen (result)); in test_function()
373 free (result); in test_function()
377 char *result; in test_function() local
379 my_asprintf (&result, "%+a %d", 1.75, 33, 44, 55); in test_function()
380 ASSERT (result != NULL); in test_function()
381 ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 in test_function()
382 || strcmp (result, "+0x3.8p-1 33") == 0 in test_function()
383 || strcmp (result, "+0x7p-2 33") == 0 in test_function()
384 || strcmp (result, "+0xep-3 33") == 0); in test_function()
385 ASSERT (retval == strlen (result)); in test_function()
386 free (result); in test_function()
390 char *result; in test_function() local
392 my_asprintf (&result, "% a %d", 1.75, 33, 44, 55); in test_function()
393 ASSERT (result != NULL); in test_function()
394 ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 in test_function()
395 || strcmp (result, " 0x3.8p-1 33") == 0 in test_function()
396 || strcmp (result, " 0x7p-2 33") == 0 in test_function()
397 || strcmp (result, " 0xep-3 33") == 0); in test_function()
398 ASSERT (retval == strlen (result)); in test_function()
399 free (result); in test_function()
403 char *result; in test_function() local
405 my_asprintf (&result, "%#a %d", 1.75, 33, 44, 55); in test_function()
406 ASSERT (result != NULL); in test_function()
407 ASSERT (strcmp (result, "0x1.cp+0 33") == 0 in test_function()
408 || strcmp (result, "0x3.8p-1 33") == 0 in test_function()
409 || strcmp (result, "0x7.p-2 33") == 0 in test_function()
410 || strcmp (result, "0xe.p-3 33") == 0); in test_function()
411 ASSERT (retval == strlen (result)); in test_function()
412 free (result); in test_function()
416 char *result; in test_function() local
418 my_asprintf (&result, "%#a %d", 1.0, 33, 44, 55); in test_function()
419 ASSERT (result != NULL); in test_function()
420 ASSERT (strcmp (result, "0x1.p+0 33") == 0 in test_function()
421 || strcmp (result, "0x2.p-1 33") == 0 in test_function()
422 || strcmp (result, "0x4.p-2 33") == 0 in test_function()
423 || strcmp (result, "0x8.p-3 33") == 0); in test_function()
424 ASSERT (retval == strlen (result)); in test_function()
425 free (result); in test_function()
429 char *result; in test_function() local
431 my_asprintf (&result, "%010a %d", 1.75, 33, 44, 55); in test_function()
432 ASSERT (result != NULL); in test_function()
433 ASSERT (strcmp (result, "0x001.cp+0 33") == 0 in test_function()
434 || strcmp (result, "0x003.8p-1 33") == 0 in test_function()
435 || strcmp (result, "0x00007p-2 33") == 0 in test_function()
436 || strcmp (result, "0x0000ep-3 33") == 0); in test_function()
437 ASSERT (retval == strlen (result)); in test_function()
438 free (result); in test_function()
442 char *result; in test_function() local
444 my_asprintf (&result, "%010a %d", Infinityd (), 33, 44, 55); in test_function()
445 ASSERT (result != NULL); in test_function()
448 ASSERT (strcmp (result, " inf 33") == 0); in test_function()
449 ASSERT (retval == strlen (result)); in test_function()
450 free (result); in test_function()
454 char *result; in test_function() local
456 my_asprintf (&result, "%050a %d", NaNd (), 33, 44, 55); in test_function()
457 ASSERT (result != NULL); in test_function()
460 ASSERT (strlen (result) == 50 + 3 in test_function()
461 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
462 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
463 ASSERT (retval == strlen (result)); in test_function()
464 free (result); in test_function()
468 char *result; in test_function() local
470 my_asprintf (&result, "%La %d", 3.1416015625L, 33, 44, 55); in test_function()
471 ASSERT (result != NULL); in test_function()
472 ASSERT (strcmp (result, "0x1.922p+1 33") == 0 in test_function()
473 || strcmp (result, "0x3.244p+0 33") == 0 in test_function()
474 || strcmp (result, "0x6.488p-1 33") == 0 in test_function()
475 || strcmp (result, "0xc.91p-2 33") == 0); in test_function()
476 ASSERT (retval == strlen (result)); in test_function()
477 free (result); in test_function()
481 char *result; in test_function() local
483 my_asprintf (&result, "%LA %d", -3.1416015625L, 33, 44, 55); in test_function()
484 ASSERT (result != NULL); in test_function()
485 ASSERT (strcmp (result, "-0X1.922P+1 33") == 0 in test_function()
486 || strcmp (result, "-0X3.244P+0 33") == 0 in test_function()
487 || strcmp (result, "-0X6.488P-1 33") == 0 in test_function()
488 || strcmp (result, "-0XC.91P-2 33") == 0); in test_function()
489 ASSERT (retval == strlen (result)); in test_function()
490 free (result); in test_function()
494 char *result; in test_function() local
496 my_asprintf (&result, "%La %d", 0.0L, 33, 44, 55); in test_function()
497 ASSERT (result != NULL); in test_function()
498 ASSERT (strcmp (result, "0x0p+0 33") == 0); in test_function()
499 ASSERT (retval == strlen (result)); in test_function()
500 free (result); in test_function()
504 char *result; in test_function() local
506 my_asprintf (&result, "%La %d", minus_zerol, 33, 44, 55); in test_function()
507 ASSERT (result != NULL); in test_function()
509 ASSERT (strcmp (result, "-0x0p+0 33") == 0); in test_function()
510 ASSERT (retval == strlen (result)); in test_function()
511 free (result); in test_function()
515 char *result; in test_function() local
517 my_asprintf (&result, "%La %d", Infinityl (), 33, 44, 55); in test_function()
518 ASSERT (result != NULL); in test_function()
519 ASSERT (strcmp (result, "inf 33") == 0); in test_function()
520 ASSERT (retval == strlen (result)); in test_function()
521 free (result); in test_function()
525 char *result; in test_function() local
527 my_asprintf (&result, "%La %d", - Infinityl (), 33, 44, 55); in test_function()
528 ASSERT (result != NULL); in test_function()
529 ASSERT (strcmp (result, "-inf 33") == 0); in test_function()
530 ASSERT (retval == strlen (result)); in test_function()
531 free (result); in test_function()
535 char *result; in test_function() local
537 my_asprintf (&result, "%La %d", NaNl (), 33, 44, 55); in test_function()
538 ASSERT (result != NULL); in test_function()
539 ASSERT (strlen (result) >= 3 + 3 in test_function()
540 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
541 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
542 ASSERT (retval == strlen (result)); in test_function()
543 free (result); in test_function()
549 char *result; in test_function() local
551 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
552 ASSERT (result != NULL); in test_function()
553 ASSERT (strlen (result) >= 3 + 3 in test_function()
554 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
555 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
556 ASSERT (retval == strlen (result)); in test_function()
557 free (result); in test_function()
563 char *result; in test_function() local
565 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
566 ASSERT (result != NULL); in test_function()
567 ASSERT (strlen (result) >= 3 + 3 in test_function()
568 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
569 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
570 ASSERT (retval == strlen (result)); in test_function()
571 free (result); in test_function()
577 char *result; in test_function() local
579 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
580 ASSERT (result != NULL); in test_function()
581 ASSERT (retval == strlen (result)); in test_function()
582 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
583 free (result); in test_function()
588 char *result; in test_function() local
590 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
591 ASSERT (result != NULL); in test_function()
592 ASSERT (retval == strlen (result)); in test_function()
593 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
594 free (result); in test_function()
599 char *result; in test_function() local
601 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
602 ASSERT (result != NULL); in test_function()
603 ASSERT (retval == strlen (result)); in test_function()
604 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
605 free (result); in test_function()
610 char *result; in test_function() local
612 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
613 ASSERT (result != NULL); in test_function()
614 ASSERT (retval == strlen (result)); in test_function()
615 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
616 free (result); in test_function()
621 char *result; in test_function() local
623 my_asprintf (&result, "%La %d", x.value, 33, 44, 55); in test_function()
624 ASSERT (result != NULL); in test_function()
625 ASSERT (retval == strlen (result)); in test_function()
626 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
627 free (result); in test_function()
632 char *result; in test_function() local
634 my_asprintf (&result, "%.0La %d", 1.5L, 33, 44, 55); in test_function()
635 ASSERT (result != NULL); in test_function()
636 ASSERT (strcmp (result, "0x2p+0 33") == 0 in test_function()
637 || strcmp (result, "0x3p-1 33") == 0 in test_function()
638 || strcmp (result, "0x6p-2 33") == 0 in test_function()
639 || strcmp (result, "0xcp-3 33") == 0); in test_function()
640 ASSERT (retval == strlen (result)); in test_function()
641 free (result); in test_function()
645 char *result; in test_function() local
647 my_asprintf (&result, "%.0La %d", 1.51L, 33, 44, 55); in test_function()
648 ASSERT (result != NULL); in test_function()
649 ASSERT (strcmp (result, "0x2p+0 33") == 0 in test_function()
650 || strcmp (result, "0x3p-1 33") == 0 in test_function()
651 || strcmp (result, "0x6p-2 33") == 0 in test_function()
652 || strcmp (result, "0xcp-3 33") == 0); in test_function()
653 ASSERT (retval == strlen (result)); in test_function()
654 free (result); in test_function()
658 char *result; in test_function() local
660 my_asprintf (&result, "%.1La %d", 1.51L, 33, 44, 55); in test_function()
661 ASSERT (result != NULL); in test_function()
662 ASSERT (strcmp (result, "0x1.8p+0 33") == 0 in test_function()
663 || strcmp (result, "0x3.0p-1 33") == 0 in test_function()
664 || strcmp (result, "0x6.1p-2 33") == 0 in test_function()
665 || strcmp (result, "0xc.1p-3 33") == 0); in test_function()
666 ASSERT (retval == strlen (result)); in test_function()
667 free (result); in test_function()
671 char *result; in test_function() local
673 my_asprintf (&result, "%.2La %d", 1.51L, 33, 44, 55); in test_function()
674 ASSERT (result != NULL); in test_function()
675 ASSERT (strcmp (result, "0x1.83p+0 33") == 0 in test_function()
676 || strcmp (result, "0x3.05p-1 33") == 0 in test_function()
677 || strcmp (result, "0x6.0ap-2 33") == 0 in test_function()
678 || strcmp (result, "0xc.14p-3 33") == 0); in test_function()
679 ASSERT (retval == strlen (result)); in test_function()
680 free (result); in test_function()
684 char *result; in test_function() local
686 my_asprintf (&result, "%.3La %d", 1.51L, 33, 44, 55); in test_function()
687 ASSERT (result != NULL); in test_function()
688 ASSERT (strcmp (result, "0x1.829p+0 33") == 0 in test_function()
689 || strcmp (result, "0x3.052p-1 33") == 0 in test_function()
690 || strcmp (result, "0x6.0a4p-2 33") == 0 in test_function()
691 || strcmp (result, "0xc.148p-3 33") == 0); in test_function()
692 ASSERT (retval == strlen (result)); in test_function()
693 free (result); in test_function()
697 char *result; in test_function() local
699 my_asprintf (&result, "%.3La %d", 1.49999L, 33, 44, 55); in test_function()
700 ASSERT (result != NULL); in test_function()
701 ASSERT (strcmp (result, "0x1.800p+0 33") == 0 in test_function()
702 || strcmp (result, "0x3.000p-1 33") == 0 in test_function()
703 || strcmp (result, "0x6.000p-2 33") == 0 in test_function()
704 || strcmp (result, "0xc.000p-3 33") == 0); in test_function()
705 ASSERT (retval == strlen (result)); in test_function()
706 free (result); in test_function()
712 char *result; in test_function() local
714 my_asprintf (&result, "%.1La %d", 1.999L, 33, 44, 55); in test_function()
715 ASSERT (result != NULL); in test_function()
716 ASSERT (strcmp (result, "0x1.0p+1 33") == 0 in test_function()
717 || strcmp (result, "0x2.0p+0 33") == 0 in test_function()
718 || strcmp (result, "0x4.0p-1 33") == 0 in test_function()
719 || strcmp (result, "0x8.0p-2 33") == 0); in test_function()
720 ASSERT (retval == strlen (result)); in test_function()
721 free (result); in test_function()
725 char *result; in test_function() local
727 my_asprintf (&result, "%10La %d", 1.75L, 33, 44, 55); in test_function()
728 ASSERT (result != NULL); in test_function()
729 ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 in test_function()
730 || strcmp (result, " 0x3.8p-1 33") == 0 in test_function()
731 || strcmp (result, " 0x7p-2 33") == 0 in test_function()
732 || strcmp (result, " 0xep-3 33") == 0); in test_function()
733 ASSERT (retval == strlen (result)); in test_function()
734 free (result); in test_function()
738 char *result; in test_function() local
740 my_asprintf (&result, "%.10La %d", 1.75L, 33, 44, 55); in test_function()
741 ASSERT (result != NULL); in test_function()
742 ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0 in test_function()
743 || strcmp (result, "0x3.8000000000p-1 33") == 0 in test_function()
744 || strcmp (result, "0x7.0000000000p-2 33") == 0 in test_function()
745 || strcmp (result, "0xe.0000000000p-3 33") == 0); in test_function()
746 ASSERT (retval == strlen (result)); in test_function()
747 free (result); in test_function()
751 char *result; in test_function() local
753 my_asprintf (&result, "%.50La %d", 1.75L, 33, 44, 55); in test_function()
754 ASSERT (result != NULL); in test_function()
755 ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0 in test_function()
756 || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0 in test_function()
757 || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0 in test_function()
758 … || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0); in test_function()
759 ASSERT (retval == strlen (result)); in test_function()
760 free (result); in test_function()
764 char *result; in test_function() local
766 my_asprintf (&result, "%-10La %d", 1.75L, 33, 44, 55); in test_function()
767 ASSERT (result != NULL); in test_function()
768 ASSERT (strcmp (result, "0x1.cp+0 33") == 0 in test_function()
769 || strcmp (result, "0x3.8p-1 33") == 0 in test_function()
770 || strcmp (result, "0x7p-2 33") == 0 in test_function()
771 || strcmp (result, "0xep-3 33") == 0); in test_function()
772 ASSERT (retval == strlen (result)); in test_function()
773 free (result); in test_function()
777 char *result; in test_function() local
779 my_asprintf (&result, "%+La %d", 1.75L, 33, 44, 55); in test_function()
780 ASSERT (result != NULL); in test_function()
781 ASSERT (strcmp (result, "+0x1.cp+0 33") == 0 in test_function()
782 || strcmp (result, "+0x3.8p-1 33") == 0 in test_function()
783 || strcmp (result, "+0x7p-2 33") == 0 in test_function()
784 || strcmp (result, "+0xep-3 33") == 0); in test_function()
785 ASSERT (retval == strlen (result)); in test_function()
786 free (result); in test_function()
790 char *result; in test_function() local
792 my_asprintf (&result, "% La %d", 1.75L, 33, 44, 55); in test_function()
793 ASSERT (result != NULL); in test_function()
794 ASSERT (strcmp (result, " 0x1.cp+0 33") == 0 in test_function()
795 || strcmp (result, " 0x3.8p-1 33") == 0 in test_function()
796 || strcmp (result, " 0x7p-2 33") == 0 in test_function()
797 || strcmp (result, " 0xep-3 33") == 0); in test_function()
798 ASSERT (retval == strlen (result)); in test_function()
799 free (result); in test_function()
803 char *result; in test_function() local
805 my_asprintf (&result, "%#La %d", 1.75L, 33, 44, 55); in test_function()
806 ASSERT (result != NULL); in test_function()
807 ASSERT (strcmp (result, "0x1.cp+0 33") == 0 in test_function()
808 || strcmp (result, "0x3.8p-1 33") == 0 in test_function()
809 || strcmp (result, "0x7.p-2 33") == 0 in test_function()
810 || strcmp (result, "0xe.p-3 33") == 0); in test_function()
811 ASSERT (retval == strlen (result)); in test_function()
812 free (result); in test_function()
816 char *result; in test_function() local
818 my_asprintf (&result, "%#La %d", 1.0L, 33, 44, 55); in test_function()
819 ASSERT (result != NULL); in test_function()
820 ASSERT (strcmp (result, "0x1.p+0 33") == 0 in test_function()
821 || strcmp (result, "0x2.p-1 33") == 0 in test_function()
822 || strcmp (result, "0x4.p-2 33") == 0 in test_function()
823 || strcmp (result, "0x8.p-3 33") == 0); in test_function()
824 ASSERT (retval == strlen (result)); in test_function()
825 free (result); in test_function()
829 char *result; in test_function() local
831 my_asprintf (&result, "%010La %d", 1.75L, 33, 44, 55); in test_function()
832 ASSERT (result != NULL); in test_function()
833 ASSERT (strcmp (result, "0x001.cp+0 33") == 0 in test_function()
834 || strcmp (result, "0x003.8p-1 33") == 0 in test_function()
835 || strcmp (result, "0x00007p-2 33") == 0 in test_function()
836 || strcmp (result, "0x0000ep-3 33") == 0); in test_function()
837 ASSERT (retval == strlen (result)); in test_function()
838 free (result); in test_function()
842 char *result; in test_function() local
844 my_asprintf (&result, "%010La %d", Infinityl (), 33, 44, 55); in test_function()
845 ASSERT (result != NULL); in test_function()
848 ASSERT (strcmp (result, " inf 33") == 0); in test_function()
849 ASSERT (retval == strlen (result)); in test_function()
850 free (result); in test_function()
854 char *result; in test_function() local
856 my_asprintf (&result, "%050La %d", NaNl (), 33, 44, 55); in test_function()
857 ASSERT (result != NULL); in test_function()
860 ASSERT (strlen (result) == 50 + 3 in test_function()
861 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
862 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
863 ASSERT (retval == strlen (result)); in test_function()
864 free (result); in test_function()
870 char *result; in test_function() local
872 my_asprintf (&result, "%f %d", 12.75, 33, 44, 55); in test_function()
873 ASSERT (result != NULL); in test_function()
874 ASSERT (strcmp (result, "12.750000 33") == 0); in test_function()
875 ASSERT (retval == strlen (result)); in test_function()
876 free (result); in test_function()
880 char *result; in test_function() local
882 my_asprintf (&result, "%f %d", 1234567.0, 33, 44, 55); in test_function()
883 ASSERT (result != NULL); in test_function()
884 ASSERT (strcmp (result, "1234567.000000 33") == 0); in test_function()
885 ASSERT (retval == strlen (result)); in test_function()
886 free (result); in test_function()
970 char *result; in test_function() local
972 my_asprintf (&result, "%f", data[k].value); in test_function()
973 ASSERT (result != NULL); in test_function()
974 ASSERT (strmatch (data[k].string, result)); in test_function()
975 ASSERT (retval == strlen (result)); in test_function()
976 free (result); in test_function()
981 char *result; in test_function() local
983 my_asprintf (&result, "%f %d", -0.03125, 33, 44, 55); in test_function()
984 ASSERT (result != NULL); in test_function()
985 ASSERT (strcmp (result, "-0.031250 33") == 0); in test_function()
986 ASSERT (retval == strlen (result)); in test_function()
987 free (result); in test_function()
991 char *result; in test_function() local
993 my_asprintf (&result, "%f %d", 0.0, 33, 44, 55); in test_function()
994 ASSERT (result != NULL); in test_function()
995 ASSERT (strcmp (result, "0.000000 33") == 0); in test_function()
996 ASSERT (retval == strlen (result)); in test_function()
997 free (result); in test_function()
1001 char *result; in test_function() local
1003 my_asprintf (&result, "%f %d", minus_zerod, 33, 44, 55); in test_function()
1004 ASSERT (result != NULL); in test_function()
1006 ASSERT (strcmp (result, "-0.000000 33") == 0); in test_function()
1007 ASSERT (retval == strlen (result)); in test_function()
1008 free (result); in test_function()
1012 char *result; in test_function() local
1014 my_asprintf (&result, "%f %d", Infinityd (), 33, 44, 55); in test_function()
1015 ASSERT (result != NULL); in test_function()
1016 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
1017 || strcmp (result, "infinity 33") == 0); in test_function()
1018 ASSERT (retval == strlen (result)); in test_function()
1019 free (result); in test_function()
1023 char *result; in test_function() local
1025 my_asprintf (&result, "%f %d", - Infinityd (), 33, 44, 55); in test_function()
1026 ASSERT (result != NULL); in test_function()
1027 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
1028 || strcmp (result, "-infinity 33") == 0); in test_function()
1029 ASSERT (retval == strlen (result)); in test_function()
1030 free (result); in test_function()
1034 char *result; in test_function() local
1036 my_asprintf (&result, "%f %d", NaNd (), 33, 44, 55); in test_function()
1037 ASSERT (result != NULL); in test_function()
1038 ASSERT (strlen (result) >= 3 + 3 in test_function()
1039 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
1040 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1041 ASSERT (retval == strlen (result)); in test_function()
1042 free (result); in test_function()
1046 char *result; in test_function() local
1048 my_asprintf (&result, "%10f %d", 1.75, 33, 44, 55); in test_function()
1049 ASSERT (result != NULL); in test_function()
1050 ASSERT (strcmp (result, " 1.750000 33") == 0); in test_function()
1051 ASSERT (retval == strlen (result)); in test_function()
1052 free (result); in test_function()
1056 char *result; in test_function() local
1058 my_asprintf (&result, "%-10f %d", 1.75, 33, 44, 55); in test_function()
1059 ASSERT (result != NULL); in test_function()
1060 ASSERT (strcmp (result, "1.750000 33") == 0); in test_function()
1061 ASSERT (retval == strlen (result)); in test_function()
1062 free (result); in test_function()
1066 char *result; in test_function() local
1068 my_asprintf (&result, "%+f %d", 1.75, 33, 44, 55); in test_function()
1069 ASSERT (result != NULL); in test_function()
1070 ASSERT (strcmp (result, "+1.750000 33") == 0); in test_function()
1071 ASSERT (retval == strlen (result)); in test_function()
1072 free (result); in test_function()
1076 char *result; in test_function() local
1078 my_asprintf (&result, "% f %d", 1.75, 33, 44, 55); in test_function()
1079 ASSERT (result != NULL); in test_function()
1080 ASSERT (strcmp (result, " 1.750000 33") == 0); in test_function()
1081 ASSERT (retval == strlen (result)); in test_function()
1082 free (result); in test_function()
1086 char *result; in test_function() local
1088 my_asprintf (&result, "%#f %d", 1.75, 33, 44, 55); in test_function()
1089 ASSERT (result != NULL); in test_function()
1090 ASSERT (strcmp (result, "1.750000 33") == 0); in test_function()
1091 ASSERT (retval == strlen (result)); in test_function()
1092 free (result); in test_function()
1096 char *result; in test_function() local
1098 my_asprintf (&result, "%#.f %d", 1.75, 33, 44, 55); in test_function()
1099 ASSERT (result != NULL); in test_function()
1100 ASSERT (strcmp (result, "2. 33") == 0); in test_function()
1101 ASSERT (retval == strlen (result)); in test_function()
1102 free (result); in test_function()
1106 char *result; in test_function() local
1108 my_asprintf (&result, "%015f %d", 1234.0, 33, 44, 55); in test_function()
1109 ASSERT (result != NULL); in test_function()
1110 ASSERT (strcmp (result, "00001234.000000 33") == 0); in test_function()
1111 ASSERT (retval == strlen (result)); in test_function()
1112 free (result); in test_function()
1116 char *result; in test_function() local
1118 my_asprintf (&result, "%015f %d", - Infinityd (), 33, 44, 55); in test_function()
1119 ASSERT (result != NULL); in test_function()
1120 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
1121 || strcmp (result, " -infinity 33") == 0); in test_function()
1122 ASSERT (retval == strlen (result)); in test_function()
1123 free (result); in test_function()
1127 char *result; in test_function() local
1129 my_asprintf (&result, "%050f %d", NaNd (), 33, 44, 55); in test_function()
1130 ASSERT (result != NULL); in test_function()
1131 ASSERT (strlen (result) == 50 + 3 in test_function()
1132 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
1133 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1134 ASSERT (retval == strlen (result)); in test_function()
1135 free (result); in test_function()
1139 char *result; in test_function() local
1141 my_asprintf (&result, "%.f %d", 1234.0, 33, 44, 55); in test_function()
1142 ASSERT (result != NULL); in test_function()
1143 ASSERT (strcmp (result, "1234 33") == 0); in test_function()
1144 ASSERT (retval == strlen (result)); in test_function()
1145 free (result); in test_function()
1149 char *result; in test_function() local
1151 my_asprintf (&result, "%.2f %d", 999.951, 33, 44, 55); in test_function()
1152 ASSERT (result != NULL); in test_function()
1153 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
1154 ASSERT (retval == strlen (result)); in test_function()
1155 free (result); in test_function()
1159 char *result; in test_function() local
1161 my_asprintf (&result, "%.2f %d", 999.996, 33, 44, 55); in test_function()
1162 ASSERT (result != NULL); in test_function()
1163 ASSERT (strcmp (result, "1000.00 33") == 0); in test_function()
1164 ASSERT (retval == strlen (result)); in test_function()
1165 free (result); in test_function()
1169 char *result; in test_function() local
1171 my_asprintf (&result, "%Lf %d", 12.75L, 33, 44, 55); in test_function()
1172 ASSERT (result != NULL); in test_function()
1173 ASSERT (strcmp (result, "12.750000 33") == 0); in test_function()
1174 ASSERT (retval == strlen (result)); in test_function()
1175 free (result); in test_function()
1179 char *result; in test_function() local
1181 my_asprintf (&result, "%Lf %d", 1234567.0L, 33, 44, 55); in test_function()
1182 ASSERT (result != NULL); in test_function()
1183 ASSERT (strcmp (result, "1234567.000000 33") == 0); in test_function()
1184 ASSERT (retval == strlen (result)); in test_function()
1185 free (result); in test_function()
1269 char *result; in test_function() local
1271 my_asprintf (&result, "%Lf", data[k].value); in test_function()
1272 ASSERT (result != NULL); in test_function()
1273 ASSERT (strmatch (data[k].string, result)); in test_function()
1274 ASSERT (retval == strlen (result)); in test_function()
1275 free (result); in test_function()
1280 char *result; in test_function() local
1282 my_asprintf (&result, "%Lf %d", -0.03125L, 33, 44, 55); in test_function()
1283 ASSERT (result != NULL); in test_function()
1284 ASSERT (strcmp (result, "-0.031250 33") == 0); in test_function()
1285 ASSERT (retval == strlen (result)); in test_function()
1286 free (result); in test_function()
1290 char *result; in test_function() local
1292 my_asprintf (&result, "%Lf %d", 0.0L, 33, 44, 55); in test_function()
1293 ASSERT (result != NULL); in test_function()
1294 ASSERT (strcmp (result, "0.000000 33") == 0); in test_function()
1295 ASSERT (retval == strlen (result)); in test_function()
1296 free (result); in test_function()
1300 char *result; in test_function() local
1302 my_asprintf (&result, "%Lf %d", minus_zerol, 33, 44, 55); in test_function()
1303 ASSERT (result != NULL); in test_function()
1305 ASSERT (strcmp (result, "-0.000000 33") == 0); in test_function()
1306 ASSERT (retval == strlen (result)); in test_function()
1307 free (result); in test_function()
1311 char *result; in test_function() local
1313 my_asprintf (&result, "%Lf %d", Infinityl (), 33, 44, 55); in test_function()
1314 ASSERT (result != NULL); in test_function()
1315 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
1316 || strcmp (result, "infinity 33") == 0); in test_function()
1317 ASSERT (retval == strlen (result)); in test_function()
1318 free (result); in test_function()
1322 char *result; in test_function() local
1324 my_asprintf (&result, "%Lf %d", - Infinityl (), 33, 44, 55); in test_function()
1325 ASSERT (result != NULL); in test_function()
1326 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
1327 || strcmp (result, "-infinity 33") == 0); in test_function()
1328 ASSERT (retval == strlen (result)); in test_function()
1329 free (result); in test_function()
1333 char *result; in test_function() local
1335 my_asprintf (&result, "%Lf %d", NaNl (), 33, 44, 55); in test_function()
1336 ASSERT (result != NULL); in test_function()
1337 ASSERT (strlen (result) >= 3 + 3 in test_function()
1338 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
1339 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1340 ASSERT (retval == strlen (result)); in test_function()
1341 free (result); in test_function()
1347 char *result; in test_function() local
1349 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1350 ASSERT (result != NULL); in test_function()
1351 ASSERT (strlen (result) >= 3 + 3 in test_function()
1352 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
1353 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1354 ASSERT (retval == strlen (result)); in test_function()
1355 free (result); in test_function()
1361 char *result; in test_function() local
1363 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1364 ASSERT (result != NULL); in test_function()
1365 ASSERT (strlen (result) >= 3 + 3 in test_function()
1366 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
1367 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1368 ASSERT (retval == strlen (result)); in test_function()
1369 free (result); in test_function()
1375 char *result; in test_function() local
1377 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1378 ASSERT (result != NULL); in test_function()
1379 ASSERT (retval == strlen (result)); in test_function()
1380 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
1381 free (result); in test_function()
1386 char *result; in test_function() local
1388 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1389 ASSERT (result != NULL); in test_function()
1390 ASSERT (retval == strlen (result)); in test_function()
1391 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
1392 free (result); in test_function()
1397 char *result; in test_function() local
1399 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1400 ASSERT (result != NULL); in test_function()
1401 ASSERT (retval == strlen (result)); in test_function()
1402 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
1403 free (result); in test_function()
1408 char *result; in test_function() local
1410 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1411 ASSERT (result != NULL); in test_function()
1412 ASSERT (retval == strlen (result)); in test_function()
1413 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
1414 free (result); in test_function()
1419 char *result; in test_function() local
1421 my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55); in test_function()
1422 ASSERT (result != NULL); in test_function()
1423 ASSERT (retval == strlen (result)); in test_function()
1424 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
1425 free (result); in test_function()
1430 char *result; in test_function() local
1432 my_asprintf (&result, "%10Lf %d", 1.75L, 33, 44, 55); in test_function()
1433 ASSERT (result != NULL); in test_function()
1434 ASSERT (strcmp (result, " 1.750000 33") == 0); in test_function()
1435 ASSERT (retval == strlen (result)); in test_function()
1436 free (result); in test_function()
1440 char *result; in test_function() local
1442 my_asprintf (&result, "%-10Lf %d", 1.75L, 33, 44, 55); in test_function()
1443 ASSERT (result != NULL); in test_function()
1444 ASSERT (strcmp (result, "1.750000 33") == 0); in test_function()
1445 ASSERT (retval == strlen (result)); in test_function()
1446 free (result); in test_function()
1450 char *result; in test_function() local
1452 my_asprintf (&result, "%+Lf %d", 1.75L, 33, 44, 55); in test_function()
1453 ASSERT (result != NULL); in test_function()
1454 ASSERT (strcmp (result, "+1.750000 33") == 0); in test_function()
1455 ASSERT (retval == strlen (result)); in test_function()
1456 free (result); in test_function()
1460 char *result; in test_function() local
1462 my_asprintf (&result, "% Lf %d", 1.75L, 33, 44, 55); in test_function()
1463 ASSERT (result != NULL); in test_function()
1464 ASSERT (strcmp (result, " 1.750000 33") == 0); in test_function()
1465 ASSERT (retval == strlen (result)); in test_function()
1466 free (result); in test_function()
1470 char *result; in test_function() local
1472 my_asprintf (&result, "%#Lf %d", 1.75L, 33, 44, 55); in test_function()
1473 ASSERT (result != NULL); in test_function()
1474 ASSERT (strcmp (result, "1.750000 33") == 0); in test_function()
1475 ASSERT (retval == strlen (result)); in test_function()
1476 free (result); in test_function()
1480 char *result; in test_function() local
1482 my_asprintf (&result, "%#.Lf %d", 1.75L, 33, 44, 55); in test_function()
1483 ASSERT (result != NULL); in test_function()
1484 ASSERT (strcmp (result, "2. 33") == 0); in test_function()
1485 ASSERT (retval == strlen (result)); in test_function()
1486 free (result); in test_function()
1490 char *result; in test_function() local
1492 my_asprintf (&result, "%015Lf %d", 1234.0L, 33, 44, 55); in test_function()
1493 ASSERT (result != NULL); in test_function()
1494 ASSERT (strcmp (result, "00001234.000000 33") == 0); in test_function()
1495 ASSERT (retval == strlen (result)); in test_function()
1496 free (result); in test_function()
1500 char *result; in test_function() local
1502 my_asprintf (&result, "%015Lf %d", - Infinityl (), 33, 44, 55); in test_function()
1503 ASSERT (result != NULL); in test_function()
1504 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
1505 || strcmp (result, " -infinity 33") == 0); in test_function()
1506 ASSERT (retval == strlen (result)); in test_function()
1507 free (result); in test_function()
1511 char *result; in test_function() local
1513 my_asprintf (&result, "%050Lf %d", NaNl (), 33, 44, 55); in test_function()
1514 ASSERT (result != NULL); in test_function()
1515 ASSERT (strlen (result) == 50 + 3 in test_function()
1516 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
1517 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1518 ASSERT (retval == strlen (result)); in test_function()
1519 free (result); in test_function()
1523 char *result; in test_function() local
1525 my_asprintf (&result, "%.Lf %d", 1234.0L, 33, 44, 55); in test_function()
1526 ASSERT (result != NULL); in test_function()
1527 ASSERT (strcmp (result, "1234 33") == 0); in test_function()
1528 ASSERT (retval == strlen (result)); in test_function()
1529 free (result); in test_function()
1533 char *result; in test_function() local
1535 my_asprintf (&result, "%.2Lf %d", 999.951L, 33, 44, 55); in test_function()
1536 ASSERT (result != NULL); in test_function()
1537 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
1538 ASSERT (retval == strlen (result)); in test_function()
1539 free (result); in test_function()
1543 char *result; in test_function() local
1545 my_asprintf (&result, "%.2Lf %d", 999.996L, 33, 44, 55); in test_function()
1546 ASSERT (result != NULL); in test_function()
1547 ASSERT (strcmp (result, "1000.00 33") == 0); in test_function()
1548 ASSERT (retval == strlen (result)); in test_function()
1549 free (result); in test_function()
1555 char *result; in test_function() local
1557 my_asprintf (&result, "%F %d", 12.75, 33, 44, 55); in test_function()
1558 ASSERT (result != NULL); in test_function()
1559 ASSERT (strcmp (result, "12.750000 33") == 0); in test_function()
1560 ASSERT (retval == strlen (result)); in test_function()
1561 free (result); in test_function()
1565 char *result; in test_function() local
1567 my_asprintf (&result, "%F %d", 1234567.0, 33, 44, 55); in test_function()
1568 ASSERT (result != NULL); in test_function()
1569 ASSERT (strcmp (result, "1234567.000000 33") == 0); in test_function()
1570 ASSERT (retval == strlen (result)); in test_function()
1571 free (result); in test_function()
1575 char *result; in test_function() local
1577 my_asprintf (&result, "%F %d", -0.03125, 33, 44, 55); in test_function()
1578 ASSERT (result != NULL); in test_function()
1579 ASSERT (strcmp (result, "-0.031250 33") == 0); in test_function()
1580 ASSERT (retval == strlen (result)); in test_function()
1581 free (result); in test_function()
1585 char *result; in test_function() local
1587 my_asprintf (&result, "%F %d", 0.0, 33, 44, 55); in test_function()
1588 ASSERT (result != NULL); in test_function()
1589 ASSERT (strcmp (result, "0.000000 33") == 0); in test_function()
1590 ASSERT (retval == strlen (result)); in test_function()
1591 free (result); in test_function()
1595 char *result; in test_function() local
1597 my_asprintf (&result, "%F %d", minus_zerod, 33, 44, 55); in test_function()
1598 ASSERT (result != NULL); in test_function()
1600 ASSERT (strcmp (result, "-0.000000 33") == 0); in test_function()
1601 ASSERT (retval == strlen (result)); in test_function()
1602 free (result); in test_function()
1606 char *result; in test_function() local
1608 my_asprintf (&result, "%F %d", Infinityd (), 33, 44, 55); in test_function()
1609 ASSERT (result != NULL); in test_function()
1610 ASSERT (strcmp (result, "INF 33") == 0 in test_function()
1611 || strcmp (result, "INFINITY 33") == 0); in test_function()
1612 ASSERT (retval == strlen (result)); in test_function()
1613 free (result); in test_function()
1617 char *result; in test_function() local
1619 my_asprintf (&result, "%F %d", - Infinityd (), 33, 44, 55); in test_function()
1620 ASSERT (result != NULL); in test_function()
1621 ASSERT (strcmp (result, "-INF 33") == 0 in test_function()
1622 || strcmp (result, "-INFINITY 33") == 0); in test_function()
1623 ASSERT (retval == strlen (result)); in test_function()
1624 free (result); in test_function()
1628 char *result; in test_function() local
1630 my_asprintf (&result, "%F %d", NaNd (), 33, 44, 55); in test_function()
1631 ASSERT (result != NULL); in test_function()
1632 ASSERT (strlen (result) >= 3 + 3 in test_function()
1633 && strisnan (result, 0, strlen (result) - 3, 1) in test_function()
1634 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1635 ASSERT (retval == strlen (result)); in test_function()
1636 free (result); in test_function()
1640 char *result; in test_function() local
1642 my_asprintf (&result, "%015F %d", 1234.0, 33, 44, 55); in test_function()
1643 ASSERT (result != NULL); in test_function()
1644 ASSERT (strcmp (result, "00001234.000000 33") == 0); in test_function()
1645 ASSERT (retval == strlen (result)); in test_function()
1646 free (result); in test_function()
1650 char *result; in test_function() local
1652 my_asprintf (&result, "%015F %d", - Infinityd (), 33, 44, 55); in test_function()
1653 ASSERT (result != NULL); in test_function()
1654 ASSERT (strcmp (result, " -INF 33") == 0 in test_function()
1655 || strcmp (result, " -INFINITY 33") == 0); in test_function()
1656 ASSERT (retval == strlen (result)); in test_function()
1657 free (result); in test_function()
1661 char *result; in test_function() local
1663 my_asprintf (&result, "%.F %d", 1234.0, 33, 44, 55); in test_function()
1664 ASSERT (result != NULL); in test_function()
1665 ASSERT (strcmp (result, "1234 33") == 0); in test_function()
1666 ASSERT (retval == strlen (result)); in test_function()
1667 free (result); in test_function()
1671 char *result; in test_function() local
1673 my_asprintf (&result, "%.2F %d", 999.951, 33, 44, 55); in test_function()
1674 ASSERT (result != NULL); in test_function()
1675 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
1676 ASSERT (retval == strlen (result)); in test_function()
1677 free (result); in test_function()
1681 char *result; in test_function() local
1683 my_asprintf (&result, "%.2F %d", 999.996, 33, 44, 55); in test_function()
1684 ASSERT (result != NULL); in test_function()
1685 ASSERT (strcmp (result, "1000.00 33") == 0); in test_function()
1686 ASSERT (retval == strlen (result)); in test_function()
1687 free (result); in test_function()
1691 char *result; in test_function() local
1693 my_asprintf (&result, "%LF %d", 12.75L, 33, 44, 55); in test_function()
1694 ASSERT (result != NULL); in test_function()
1695 ASSERT (strcmp (result, "12.750000 33") == 0); in test_function()
1696 ASSERT (retval == strlen (result)); in test_function()
1697 free (result); in test_function()
1701 char *result; in test_function() local
1703 my_asprintf (&result, "%LF %d", 1234567.0L, 33, 44, 55); in test_function()
1704 ASSERT (result != NULL); in test_function()
1705 ASSERT (strcmp (result, "1234567.000000 33") == 0); in test_function()
1706 ASSERT (retval == strlen (result)); in test_function()
1707 free (result); in test_function()
1711 char *result; in test_function() local
1713 my_asprintf (&result, "%LF %d", -0.03125L, 33, 44, 55); in test_function()
1714 ASSERT (result != NULL); in test_function()
1715 ASSERT (strcmp (result, "-0.031250 33") == 0); in test_function()
1716 ASSERT (retval == strlen (result)); in test_function()
1717 free (result); in test_function()
1721 char *result; in test_function() local
1723 my_asprintf (&result, "%LF %d", 0.0L, 33, 44, 55); in test_function()
1724 ASSERT (result != NULL); in test_function()
1725 ASSERT (strcmp (result, "0.000000 33") == 0); in test_function()
1726 ASSERT (retval == strlen (result)); in test_function()
1727 free (result); in test_function()
1731 char *result; in test_function() local
1733 my_asprintf (&result, "%LF %d", minus_zerol, 33, 44, 55); in test_function()
1734 ASSERT (result != NULL); in test_function()
1736 ASSERT (strcmp (result, "-0.000000 33") == 0); in test_function()
1737 ASSERT (retval == strlen (result)); in test_function()
1738 free (result); in test_function()
1742 char *result; in test_function() local
1744 my_asprintf (&result, "%LF %d", Infinityl (), 33, 44, 55); in test_function()
1745 ASSERT (result != NULL); in test_function()
1746 ASSERT (strcmp (result, "INF 33") == 0 in test_function()
1747 || strcmp (result, "INFINITY 33") == 0); in test_function()
1748 ASSERT (retval == strlen (result)); in test_function()
1749 free (result); in test_function()
1753 char *result; in test_function() local
1755 my_asprintf (&result, "%LF %d", - Infinityl (), 33, 44, 55); in test_function()
1756 ASSERT (result != NULL); in test_function()
1757 ASSERT (strcmp (result, "-INF 33") == 0 in test_function()
1758 || strcmp (result, "-INFINITY 33") == 0); in test_function()
1759 ASSERT (retval == strlen (result)); in test_function()
1760 free (result); in test_function()
1764 char *result; in test_function() local
1766 my_asprintf (&result, "%LF %d", NaNl (), 33, 44, 55); in test_function()
1767 ASSERT (result != NULL); in test_function()
1768 ASSERT (strlen (result) >= 3 + 3 in test_function()
1769 && strisnan (result, 0, strlen (result) - 3, 1) in test_function()
1770 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
1771 ASSERT (retval == strlen (result)); in test_function()
1772 free (result); in test_function()
1776 char *result; in test_function() local
1778 my_asprintf (&result, "%015LF %d", 1234.0L, 33, 44, 55); in test_function()
1779 ASSERT (result != NULL); in test_function()
1780 ASSERT (strcmp (result, "00001234.000000 33") == 0); in test_function()
1781 ASSERT (retval == strlen (result)); in test_function()
1782 free (result); in test_function()
1786 char *result; in test_function() local
1788 my_asprintf (&result, "%015LF %d", - Infinityl (), 33, 44, 55); in test_function()
1789 ASSERT (result != NULL); in test_function()
1790 ASSERT (strcmp (result, " -INF 33") == 0 in test_function()
1791 || strcmp (result, " -INFINITY 33") == 0); in test_function()
1792 ASSERT (retval == strlen (result)); in test_function()
1793 free (result); in test_function()
1797 char *result; in test_function() local
1799 my_asprintf (&result, "%.LF %d", 1234.0L, 33, 44, 55); in test_function()
1800 ASSERT (result != NULL); in test_function()
1801 ASSERT (strcmp (result, "1234 33") == 0); in test_function()
1802 ASSERT (retval == strlen (result)); in test_function()
1803 free (result); in test_function()
1807 char *result; in test_function() local
1809 my_asprintf (&result, "%.2LF %d", 999.951L, 33, 44, 55); in test_function()
1810 ASSERT (result != NULL); in test_function()
1811 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
1812 ASSERT (retval == strlen (result)); in test_function()
1813 free (result); in test_function()
1817 char *result; in test_function() local
1819 my_asprintf (&result, "%.2LF %d", 999.996L, 33, 44, 55); in test_function()
1820 ASSERT (result != NULL); in test_function()
1821 ASSERT (strcmp (result, "1000.00 33") == 0); in test_function()
1822 ASSERT (retval == strlen (result)); in test_function()
1823 free (result); in test_function()
1829 char *result; in test_function() local
1831 my_asprintf (&result, "%e %d", 12.75, 33, 44, 55); in test_function()
1832 ASSERT (result != NULL); in test_function()
1833 ASSERT (strcmp (result, "1.275000e+01 33") == 0 in test_function()
1834 || strcmp (result, "1.275000e+001 33") == 0); in test_function()
1835 ASSERT (retval == strlen (result)); in test_function()
1836 free (result); in test_function()
1840 char *result; in test_function() local
1842 my_asprintf (&result, "%e %d", 1234567.0, 33, 44, 55); in test_function()
1843 ASSERT (result != NULL); in test_function()
1844 ASSERT (strcmp (result, "1.234567e+06 33") == 0 in test_function()
1845 || strcmp (result, "1.234567e+006 33") == 0); in test_function()
1846 ASSERT (retval == strlen (result)); in test_function()
1847 free (result); in test_function()
1931 char *result; in test_function() local
1933 my_asprintf (&result, "%e", data[k].value); in test_function()
1935 ASSERT (result != NULL); in test_function()
1936 ASSERT (strcmp (result, expected) == 0 in test_function()
1938 || (strlen (result) == strlen (expected) + 1 in test_function()
1939 && memcmp (result, expected, strlen (expected) - 2) == 0 in test_function()
1940 && result[strlen (expected) - 2] == '0' in test_function()
1941 && strcmp (result + strlen (expected) - 1, in test_function()
1944 ASSERT (retval == strlen (result)); in test_function()
1945 free (result); in test_function()
1950 char *result; in test_function() local
1952 my_asprintf (&result, "%e %d", -0.03125, 33, 44, 55); in test_function()
1953 ASSERT (result != NULL); in test_function()
1954 ASSERT (strcmp (result, "-3.125000e-02 33") == 0 in test_function()
1955 || strcmp (result, "-3.125000e-002 33") == 0); in test_function()
1956 ASSERT (retval == strlen (result)); in test_function()
1957 free (result); in test_function()
1961 char *result; in test_function() local
1963 my_asprintf (&result, "%e %d", 0.0, 33, 44, 55); in test_function()
1964 ASSERT (result != NULL); in test_function()
1965 ASSERT (strcmp (result, "0.000000e+00 33") == 0 in test_function()
1966 || strcmp (result, "0.000000e+000 33") == 0); in test_function()
1967 ASSERT (retval == strlen (result)); in test_function()
1968 free (result); in test_function()
1972 char *result; in test_function() local
1974 my_asprintf (&result, "%e %d", minus_zerod, 33, 44, 55); in test_function()
1975 ASSERT (result != NULL); in test_function()
1977 ASSERT (strcmp (result, "-0.000000e+00 33") == 0 in test_function()
1978 || strcmp (result, "-0.000000e+000 33") == 0); in test_function()
1979 ASSERT (retval == strlen (result)); in test_function()
1980 free (result); in test_function()
1984 char *result; in test_function() local
1986 my_asprintf (&result, "%e %d", Infinityd (), 33, 44, 55); in test_function()
1987 ASSERT (result != NULL); in test_function()
1988 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
1989 || strcmp (result, "infinity 33") == 0); in test_function()
1990 ASSERT (retval == strlen (result)); in test_function()
1991 free (result); in test_function()
1995 char *result; in test_function() local
1997 my_asprintf (&result, "%e %d", - Infinityd (), 33, 44, 55); in test_function()
1998 ASSERT (result != NULL); in test_function()
1999 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
2000 || strcmp (result, "-infinity 33") == 0); in test_function()
2001 ASSERT (retval == strlen (result)); in test_function()
2002 free (result); in test_function()
2006 char *result; in test_function() local
2008 my_asprintf (&result, "%e %d", NaNd (), 33, 44, 55); in test_function()
2009 ASSERT (result != NULL); in test_function()
2010 ASSERT (strlen (result) >= 3 + 3 in test_function()
2011 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
2012 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2013 ASSERT (retval == strlen (result)); in test_function()
2014 free (result); in test_function()
2018 char *result; in test_function() local
2020 my_asprintf (&result, "%15e %d", 1.75, 33, 44, 55); in test_function()
2021 ASSERT (result != NULL); in test_function()
2022 ASSERT (strcmp (result, " 1.750000e+00 33") == 0 in test_function()
2023 || strcmp (result, " 1.750000e+000 33") == 0); in test_function()
2024 ASSERT (retval == strlen (result)); in test_function()
2025 free (result); in test_function()
2029 char *result; in test_function() local
2031 my_asprintf (&result, "%-15e %d", 1.75, 33, 44, 55); in test_function()
2032 ASSERT (result != NULL); in test_function()
2033 ASSERT (strcmp (result, "1.750000e+00 33") == 0 in test_function()
2034 || strcmp (result, "1.750000e+000 33") == 0); in test_function()
2035 ASSERT (retval == strlen (result)); in test_function()
2036 free (result); in test_function()
2040 char *result; in test_function() local
2042 my_asprintf (&result, "%+e %d", 1.75, 33, 44, 55); in test_function()
2043 ASSERT (result != NULL); in test_function()
2044 ASSERT (strcmp (result, "+1.750000e+00 33") == 0 in test_function()
2045 || strcmp (result, "+1.750000e+000 33") == 0); in test_function()
2046 ASSERT (retval == strlen (result)); in test_function()
2047 free (result); in test_function()
2051 char *result; in test_function() local
2053 my_asprintf (&result, "% e %d", 1.75, 33, 44, 55); in test_function()
2054 ASSERT (result != NULL); in test_function()
2055 ASSERT (strcmp (result, " 1.750000e+00 33") == 0 in test_function()
2056 || strcmp (result, " 1.750000e+000 33") == 0); in test_function()
2057 ASSERT (retval == strlen (result)); in test_function()
2058 free (result); in test_function()
2062 char *result; in test_function() local
2064 my_asprintf (&result, "%#e %d", 1.75, 33, 44, 55); in test_function()
2065 ASSERT (result != NULL); in test_function()
2066 ASSERT (strcmp (result, "1.750000e+00 33") == 0 in test_function()
2067 || strcmp (result, "1.750000e+000 33") == 0); in test_function()
2068 ASSERT (retval == strlen (result)); in test_function()
2069 free (result); in test_function()
2073 char *result; in test_function() local
2075 my_asprintf (&result, "%#.e %d", 1.75, 33, 44, 55); in test_function()
2076 ASSERT (result != NULL); in test_function()
2077 ASSERT (strcmp (result, "2.e+00 33") == 0 in test_function()
2078 || strcmp (result, "2.e+000 33") == 0); in test_function()
2079 ASSERT (retval == strlen (result)); in test_function()
2080 free (result); in test_function()
2084 char *result; in test_function() local
2086 my_asprintf (&result, "%#.e %d", 9.75, 33, 44, 55); in test_function()
2087 ASSERT (result != NULL); in test_function()
2088 ASSERT (strcmp (result, "1.e+01 33") == 0 in test_function()
2089 || strcmp (result, "1.e+001 33") == 0); in test_function()
2090 ASSERT (retval == strlen (result)); in test_function()
2091 free (result); in test_function()
2095 char *result; in test_function() local
2097 my_asprintf (&result, "%015e %d", 1234.0, 33, 44, 55); in test_function()
2098 ASSERT (result != NULL); in test_function()
2099 ASSERT (strcmp (result, "0001.234000e+03 33") == 0 in test_function()
2100 || strcmp (result, "001.234000e+003 33") == 0); in test_function()
2101 ASSERT (retval == strlen (result)); in test_function()
2102 free (result); in test_function()
2106 char *result; in test_function() local
2108 my_asprintf (&result, "%015e %d", - Infinityd (), 33, 44, 55); in test_function()
2109 ASSERT (result != NULL); in test_function()
2110 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
2111 || strcmp (result, " -infinity 33") == 0); in test_function()
2112 ASSERT (retval == strlen (result)); in test_function()
2113 free (result); in test_function()
2117 char *result; in test_function() local
2119 my_asprintf (&result, "%050e %d", NaNd (), 33, 44, 55); in test_function()
2120 ASSERT (result != NULL); in test_function()
2121 ASSERT (strlen (result) == 50 + 3 in test_function()
2122 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
2123 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2124 ASSERT (retval == strlen (result)); in test_function()
2125 free (result); in test_function()
2129 char *result; in test_function() local
2131 my_asprintf (&result, "%.e %d", 1234.0, 33, 44, 55); in test_function()
2132 ASSERT (result != NULL); in test_function()
2133 ASSERT (strcmp (result, "1e+03 33") == 0 in test_function()
2134 || strcmp (result, "1e+003 33") == 0); in test_function()
2135 ASSERT (retval == strlen (result)); in test_function()
2136 free (result); in test_function()
2140 char *result; in test_function() local
2142 my_asprintf (&result, "%.4e %d", 999.951, 33, 44, 55); in test_function()
2143 ASSERT (result != NULL); in test_function()
2144 ASSERT (strcmp (result, "9.9995e+02 33") == 0 in test_function()
2145 || strcmp (result, "9.9995e+002 33") == 0); in test_function()
2146 ASSERT (retval == strlen (result)); in test_function()
2147 free (result); in test_function()
2151 char *result; in test_function() local
2153 my_asprintf (&result, "%.4e %d", 999.996, 33, 44, 55); in test_function()
2154 ASSERT (result != NULL); in test_function()
2155 ASSERT (strcmp (result, "1.0000e+03 33") == 0 in test_function()
2156 || strcmp (result, "1.0000e+003 33") == 0); in test_function()
2157 ASSERT (retval == strlen (result)); in test_function()
2158 free (result); in test_function()
2162 char *result; in test_function() local
2164 my_asprintf (&result, "%Le %d", 12.75L, 33, 44, 55); in test_function()
2165 ASSERT (result != NULL); in test_function()
2166 ASSERT (strcmp (result, "1.275000e+01 33") == 0 in test_function()
2167 || strcmp (result, "1.275000e+001 33") == 0); in test_function()
2168 ASSERT (retval == strlen (result)); in test_function()
2169 free (result); in test_function()
2173 char *result; in test_function() local
2175 my_asprintf (&result, "%Le %d", 1234567.0L, 33, 44, 55); in test_function()
2176 ASSERT (result != NULL); in test_function()
2177 ASSERT (strcmp (result, "1.234567e+06 33") == 0 in test_function()
2178 || strcmp (result, "1.234567e+006 33") == 0); in test_function()
2179 ASSERT (retval == strlen (result)); in test_function()
2180 free (result); in test_function()
2264 char *result; in test_function() local
2266 my_asprintf (&result, "%Le", data[k].value); in test_function()
2268 ASSERT (result != NULL); in test_function()
2269 ASSERT (strcmp (result, expected) == 0 in test_function()
2271 || (strlen (result) == strlen (expected) + 1 in test_function()
2272 && memcmp (result, expected, strlen (expected) - 2) == 0 in test_function()
2273 && result[strlen (expected) - 2] == '0' in test_function()
2274 && strcmp (result + strlen (expected) - 1, in test_function()
2277 ASSERT (retval == strlen (result)); in test_function()
2278 free (result); in test_function()
2283 char *result; in test_function() local
2285 my_asprintf (&result, "%Le %d", -0.03125L, 33, 44, 55); in test_function()
2286 ASSERT (result != NULL); in test_function()
2287 ASSERT (strcmp (result, "-3.125000e-02 33") == 0 in test_function()
2288 || strcmp (result, "-3.125000e-002 33") == 0); in test_function()
2289 ASSERT (retval == strlen (result)); in test_function()
2290 free (result); in test_function()
2294 char *result; in test_function() local
2296 my_asprintf (&result, "%Le %d", 0.0L, 33, 44, 55); in test_function()
2297 ASSERT (result != NULL); in test_function()
2298 ASSERT (strcmp (result, "0.000000e+00 33") == 0 in test_function()
2299 || strcmp (result, "0.000000e+000 33") == 0); in test_function()
2300 ASSERT (retval == strlen (result)); in test_function()
2301 free (result); in test_function()
2305 char *result; in test_function() local
2307 my_asprintf (&result, "%Le %d", minus_zerol, 33, 44, 55); in test_function()
2308 ASSERT (result != NULL); in test_function()
2310 ASSERT (strcmp (result, "-0.000000e+00 33") == 0 in test_function()
2311 || strcmp (result, "-0.000000e+000 33") == 0); in test_function()
2312 ASSERT (retval == strlen (result)); in test_function()
2313 free (result); in test_function()
2317 char *result; in test_function() local
2319 my_asprintf (&result, "%Le %d", Infinityl (), 33, 44, 55); in test_function()
2320 ASSERT (result != NULL); in test_function()
2321 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
2322 || strcmp (result, "infinity 33") == 0); in test_function()
2323 ASSERT (retval == strlen (result)); in test_function()
2324 free (result); in test_function()
2328 char *result; in test_function() local
2330 my_asprintf (&result, "%Le %d", - Infinityl (), 33, 44, 55); in test_function()
2331 ASSERT (result != NULL); in test_function()
2332 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
2333 || strcmp (result, "-infinity 33") == 0); in test_function()
2334 ASSERT (retval == strlen (result)); in test_function()
2335 free (result); in test_function()
2339 char *result; in test_function() local
2341 my_asprintf (&result, "%Le %d", NaNl (), 33, 44, 55); in test_function()
2342 ASSERT (result != NULL); in test_function()
2343 ASSERT (strlen (result) >= 3 + 3 in test_function()
2344 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
2345 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2346 ASSERT (retval == strlen (result)); in test_function()
2347 free (result); in test_function()
2353 char *result; in test_function() local
2355 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2356 ASSERT (result != NULL); in test_function()
2357 ASSERT (strlen (result) >= 3 + 3 in test_function()
2358 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
2359 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2360 ASSERT (retval == strlen (result)); in test_function()
2361 free (result); in test_function()
2367 char *result; in test_function() local
2369 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2370 ASSERT (result != NULL); in test_function()
2371 ASSERT (strlen (result) >= 3 + 3 in test_function()
2372 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
2373 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2374 ASSERT (retval == strlen (result)); in test_function()
2375 free (result); in test_function()
2381 char *result; in test_function() local
2383 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2384 ASSERT (result != NULL); in test_function()
2385 ASSERT (retval == strlen (result)); in test_function()
2386 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
2387 free (result); in test_function()
2392 char *result; in test_function() local
2394 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2395 ASSERT (result != NULL); in test_function()
2396 ASSERT (retval == strlen (result)); in test_function()
2397 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
2398 free (result); in test_function()
2403 char *result; in test_function() local
2405 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2406 ASSERT (result != NULL); in test_function()
2407 ASSERT (retval == strlen (result)); in test_function()
2408 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
2409 free (result); in test_function()
2414 char *result; in test_function() local
2416 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2417 ASSERT (result != NULL); in test_function()
2418 ASSERT (retval == strlen (result)); in test_function()
2419 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
2420 free (result); in test_function()
2425 char *result; in test_function() local
2427 my_asprintf (&result, "%Le %d", x.value, 33, 44, 55); in test_function()
2428 ASSERT (result != NULL); in test_function()
2429 ASSERT (retval == strlen (result)); in test_function()
2430 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
2431 free (result); in test_function()
2436 char *result; in test_function() local
2438 my_asprintf (&result, "%15Le %d", 1.75L, 33, 44, 55); in test_function()
2439 ASSERT (result != NULL); in test_function()
2440 ASSERT (strcmp (result, " 1.750000e+00 33") == 0 in test_function()
2441 || strcmp (result, " 1.750000e+000 33") == 0); in test_function()
2442 ASSERT (retval == strlen (result)); in test_function()
2443 free (result); in test_function()
2447 char *result; in test_function() local
2449 my_asprintf (&result, "%-15Le %d", 1.75L, 33, 44, 55); in test_function()
2450 ASSERT (result != NULL); in test_function()
2451 ASSERT (strcmp (result, "1.750000e+00 33") == 0 in test_function()
2452 || strcmp (result, "1.750000e+000 33") == 0); in test_function()
2453 ASSERT (retval == strlen (result)); in test_function()
2454 free (result); in test_function()
2458 char *result; in test_function() local
2460 my_asprintf (&result, "%+Le %d", 1.75L, 33, 44, 55); in test_function()
2461 ASSERT (result != NULL); in test_function()
2462 ASSERT (strcmp (result, "+1.750000e+00 33") == 0 in test_function()
2463 || strcmp (result, "+1.750000e+000 33") == 0); in test_function()
2464 ASSERT (retval == strlen (result)); in test_function()
2465 free (result); in test_function()
2469 char *result; in test_function() local
2471 my_asprintf (&result, "% Le %d", 1.75L, 33, 44, 55); in test_function()
2472 ASSERT (result != NULL); in test_function()
2473 ASSERT (strcmp (result, " 1.750000e+00 33") == 0 in test_function()
2474 || strcmp (result, " 1.750000e+000 33") == 0); in test_function()
2475 ASSERT (retval == strlen (result)); in test_function()
2476 free (result); in test_function()
2480 char *result; in test_function() local
2482 my_asprintf (&result, "%#Le %d", 1.75L, 33, 44, 55); in test_function()
2483 ASSERT (result != NULL); in test_function()
2484 ASSERT (strcmp (result, "1.750000e+00 33") == 0 in test_function()
2485 || strcmp (result, "1.750000e+000 33") == 0); in test_function()
2486 ASSERT (retval == strlen (result)); in test_function()
2487 free (result); in test_function()
2491 char *result; in test_function() local
2493 my_asprintf (&result, "%#.Le %d", 1.75L, 33, 44, 55); in test_function()
2494 ASSERT (result != NULL); in test_function()
2495 ASSERT (strcmp (result, "2.e+00 33") == 0 in test_function()
2496 || strcmp (result, "2.e+000 33") == 0); in test_function()
2497 ASSERT (retval == strlen (result)); in test_function()
2498 free (result); in test_function()
2502 char *result; in test_function() local
2504 my_asprintf (&result, "%#.Le %d", 9.75L, 33, 44, 55); in test_function()
2505 ASSERT (result != NULL); in test_function()
2506 ASSERT (strcmp (result, "1.e+01 33") == 0 in test_function()
2507 || strcmp (result, "1.e+001 33") == 0); in test_function()
2508 ASSERT (retval == strlen (result)); in test_function()
2509 free (result); in test_function()
2513 char *result; in test_function() local
2515 my_asprintf (&result, "%015Le %d", 1234.0L, 33, 44, 55); in test_function()
2516 ASSERT (result != NULL); in test_function()
2517 ASSERT (strcmp (result, "0001.234000e+03 33") == 0 in test_function()
2518 || strcmp (result, "001.234000e+003 33") == 0); in test_function()
2519 ASSERT (retval == strlen (result)); in test_function()
2520 free (result); in test_function()
2524 char *result; in test_function() local
2526 my_asprintf (&result, "%015Le %d", - Infinityl (), 33, 44, 55); in test_function()
2527 ASSERT (result != NULL); in test_function()
2528 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
2529 || strcmp (result, " -infinity 33") == 0); in test_function()
2530 ASSERT (retval == strlen (result)); in test_function()
2531 free (result); in test_function()
2535 char *result; in test_function() local
2537 my_asprintf (&result, "%050Le %d", NaNl (), 33, 44, 55); in test_function()
2538 ASSERT (result != NULL); in test_function()
2539 ASSERT (strlen (result) == 50 + 3 in test_function()
2540 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
2541 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2542 ASSERT (retval == strlen (result)); in test_function()
2543 free (result); in test_function()
2547 char *result; in test_function() local
2549 my_asprintf (&result, "%.Le %d", 1234.0L, 33, 44, 55); in test_function()
2550 ASSERT (result != NULL); in test_function()
2551 ASSERT (strcmp (result, "1e+03 33") == 0 in test_function()
2552 || strcmp (result, "1e+003 33") == 0); in test_function()
2553 ASSERT (retval == strlen (result)); in test_function()
2554 free (result); in test_function()
2558 char *result; in test_function() local
2560 my_asprintf (&result, "%.4Le %d", 999.951L, 33, 44, 55); in test_function()
2561 ASSERT (result != NULL); in test_function()
2562 ASSERT (strcmp (result, "9.9995e+02 33") == 0 in test_function()
2563 || strcmp (result, "9.9995e+002 33") == 0); in test_function()
2564 ASSERT (retval == strlen (result)); in test_function()
2565 free (result); in test_function()
2569 char *result; in test_function() local
2571 my_asprintf (&result, "%.4Le %d", 999.996L, 33, 44, 55); in test_function()
2572 ASSERT (result != NULL); in test_function()
2573 ASSERT (strcmp (result, "1.0000e+03 33") == 0 in test_function()
2574 || strcmp (result, "1.0000e+003 33") == 0); in test_function()
2575 ASSERT (retval == strlen (result)); in test_function()
2576 free (result); in test_function()
2582 char *result; in test_function() local
2584 my_asprintf (&result, "%g %d", 12.75, 33, 44, 55); in test_function()
2585 ASSERT (result != NULL); in test_function()
2586 ASSERT (strcmp (result, "12.75 33") == 0); in test_function()
2587 ASSERT (retval == strlen (result)); in test_function()
2588 free (result); in test_function()
2592 char *result; in test_function() local
2594 my_asprintf (&result, "%g %d", 1234567.0, 33, 44, 55); in test_function()
2595 ASSERT (result != NULL); in test_function()
2596 ASSERT (strcmp (result, "1.23457e+06 33") == 0 in test_function()
2597 || strcmp (result, "1.23457e+006 33") == 0); in test_function()
2598 ASSERT (retval == strlen (result)); in test_function()
2599 free (result); in test_function()
2683 char *result; in test_function() local
2685 my_asprintf (&result, "%g", data[k].value); in test_function()
2687 ASSERT (result != NULL); in test_function()
2688 ASSERT (strcmp (result, expected) == 0 in test_function()
2691 && strlen (result) == strlen (expected) + 1 in test_function()
2692 && memcmp (result, expected, strlen (expected) - 2) == 0 in test_function()
2693 && result[strlen (expected) - 2] == '0' in test_function()
2694 && strcmp (result + strlen (expected) - 1, in test_function()
2697 ASSERT (retval == strlen (result)); in test_function()
2698 free (result); in test_function()
2703 char *result; in test_function() local
2705 my_asprintf (&result, "%g %d", -0.03125, 33, 44, 55); in test_function()
2706 ASSERT (result != NULL); in test_function()
2707 ASSERT (strcmp (result, "-0.03125 33") == 0); in test_function()
2708 ASSERT (retval == strlen (result)); in test_function()
2709 free (result); in test_function()
2713 char *result; in test_function() local
2715 my_asprintf (&result, "%g %d", 0.0, 33, 44, 55); in test_function()
2716 ASSERT (result != NULL); in test_function()
2717 ASSERT (strcmp (result, "0 33") == 0); in test_function()
2718 ASSERT (retval == strlen (result)); in test_function()
2719 free (result); in test_function()
2723 char *result; in test_function() local
2725 my_asprintf (&result, "%g %d", minus_zerod, 33, 44, 55); in test_function()
2726 ASSERT (result != NULL); in test_function()
2728 ASSERT (strcmp (result, "-0 33") == 0); in test_function()
2729 ASSERT (retval == strlen (result)); in test_function()
2730 free (result); in test_function()
2734 char *result; in test_function() local
2736 my_asprintf (&result, "%g %d", Infinityd (), 33, 44, 55); in test_function()
2737 ASSERT (result != NULL); in test_function()
2738 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
2739 || strcmp (result, "infinity 33") == 0); in test_function()
2740 ASSERT (retval == strlen (result)); in test_function()
2741 free (result); in test_function()
2745 char *result; in test_function() local
2747 my_asprintf (&result, "%g %d", - Infinityd (), 33, 44, 55); in test_function()
2748 ASSERT (result != NULL); in test_function()
2749 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
2750 || strcmp (result, "-infinity 33") == 0); in test_function()
2751 ASSERT (retval == strlen (result)); in test_function()
2752 free (result); in test_function()
2756 char *result; in test_function() local
2758 my_asprintf (&result, "%g %d", NaNd (), 33, 44, 55); in test_function()
2759 ASSERT (result != NULL); in test_function()
2760 ASSERT (strlen (result) >= 3 + 3 in test_function()
2761 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
2762 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2763 ASSERT (retval == strlen (result)); in test_function()
2764 free (result); in test_function()
2768 char *result; in test_function() local
2770 my_asprintf (&result, "%10g %d", 1.75, 33, 44, 55); in test_function()
2771 ASSERT (result != NULL); in test_function()
2772 ASSERT (strcmp (result, " 1.75 33") == 0); in test_function()
2773 ASSERT (retval == strlen (result)); in test_function()
2774 free (result); in test_function()
2778 char *result; in test_function() local
2780 my_asprintf (&result, "%-10g %d", 1.75, 33, 44, 55); in test_function()
2781 ASSERT (result != NULL); in test_function()
2782 ASSERT (strcmp (result, "1.75 33") == 0); in test_function()
2783 ASSERT (retval == strlen (result)); in test_function()
2784 free (result); in test_function()
2788 char *result; in test_function() local
2790 my_asprintf (&result, "%+g %d", 1.75, 33, 44, 55); in test_function()
2791 ASSERT (result != NULL); in test_function()
2792 ASSERT (strcmp (result, "+1.75 33") == 0); in test_function()
2793 ASSERT (retval == strlen (result)); in test_function()
2794 free (result); in test_function()
2798 char *result; in test_function() local
2800 my_asprintf (&result, "% g %d", 1.75, 33, 44, 55); in test_function()
2801 ASSERT (result != NULL); in test_function()
2802 ASSERT (strcmp (result, " 1.75 33") == 0); in test_function()
2803 ASSERT (retval == strlen (result)); in test_function()
2804 free (result); in test_function()
2808 char *result; in test_function() local
2810 my_asprintf (&result, "%#g %d", 1.75, 33, 44, 55); in test_function()
2811 ASSERT (result != NULL); in test_function()
2812 ASSERT (strcmp (result, "1.75000 33") == 0); in test_function()
2813 ASSERT (retval == strlen (result)); in test_function()
2814 free (result); in test_function()
2818 char *result; in test_function() local
2820 my_asprintf (&result, "%#.g %d", 1.75, 33, 44, 55); in test_function()
2821 ASSERT (result != NULL); in test_function()
2822 ASSERT (strcmp (result, "2. 33") == 0); in test_function()
2823 ASSERT (retval == strlen (result)); in test_function()
2824 free (result); in test_function()
2828 char *result; in test_function() local
2830 my_asprintf (&result, "%#.g %d", 9.75, 33, 44, 55); in test_function()
2831 ASSERT (result != NULL); in test_function()
2832 ASSERT (strcmp (result, "1.e+01 33") == 0 in test_function()
2833 || strcmp (result, "1.e+001 33") == 0); in test_function()
2834 ASSERT (retval == strlen (result)); in test_function()
2835 free (result); in test_function()
2839 char *result; in test_function() local
2841 my_asprintf (&result, "%010g %d", 1234.0, 33, 44, 55); in test_function()
2842 ASSERT (result != NULL); in test_function()
2843 ASSERT (strcmp (result, "0000001234 33") == 0); in test_function()
2844 ASSERT (retval == strlen (result)); in test_function()
2845 free (result); in test_function()
2849 char *result; in test_function() local
2851 my_asprintf (&result, "%015g %d", - Infinityd (), 33, 44, 55); in test_function()
2852 ASSERT (result != NULL); in test_function()
2853 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
2854 || strcmp (result, " -infinity 33") == 0); in test_function()
2855 ASSERT (retval == strlen (result)); in test_function()
2856 free (result); in test_function()
2860 char *result; in test_function() local
2862 my_asprintf (&result, "%050g %d", NaNd (), 33, 44, 55); in test_function()
2863 ASSERT (result != NULL); in test_function()
2864 ASSERT (strlen (result) == 50 + 3 in test_function()
2865 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
2866 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
2867 ASSERT (retval == strlen (result)); in test_function()
2868 free (result); in test_function()
2872 char *result; in test_function() local
2874 my_asprintf (&result, "%.g %d", 1234.0, 33, 44, 55); in test_function()
2875 ASSERT (result != NULL); in test_function()
2876 ASSERT (strcmp (result, "1e+03 33") == 0 in test_function()
2877 || strcmp (result, "1e+003 33") == 0); in test_function()
2878 ASSERT (retval == strlen (result)); in test_function()
2879 free (result); in test_function()
2883 char *result; in test_function() local
2885 my_asprintf (&result, "%.5g %d", 999.951, 33, 44, 55); in test_function()
2886 ASSERT (result != NULL); in test_function()
2887 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
2888 ASSERT (retval == strlen (result)); in test_function()
2889 free (result); in test_function()
2893 char *result; in test_function() local
2895 my_asprintf (&result, "%.5g %d", 999.996, 33, 44, 55); in test_function()
2896 ASSERT (result != NULL); in test_function()
2897 ASSERT (strcmp (result, "1000 33") == 0); in test_function()
2898 ASSERT (retval == strlen (result)); in test_function()
2899 free (result); in test_function()
2903 char *result; in test_function() local
2905 my_asprintf (&result, "%Lg %d", 12.75L, 33, 44, 55); in test_function()
2906 ASSERT (result != NULL); in test_function()
2907 ASSERT (strcmp (result, "12.75 33") == 0); in test_function()
2908 ASSERT (retval == strlen (result)); in test_function()
2909 free (result); in test_function()
2913 char *result; in test_function() local
2915 my_asprintf (&result, "%Lg %d", 1234567.0L, 33, 44, 55); in test_function()
2916 ASSERT (result != NULL); in test_function()
2917 ASSERT (strcmp (result, "1.23457e+06 33") == 0 in test_function()
2918 || strcmp (result, "1.23457e+006 33") == 0); in test_function()
2919 ASSERT (retval == strlen (result)); in test_function()
2920 free (result); in test_function()
3004 char *result; in test_function() local
3006 my_asprintf (&result, "%Lg", data[k].value); in test_function()
3008 ASSERT (result != NULL); in test_function()
3009 ASSERT (strcmp (result, expected) == 0 in test_function()
3012 && strlen (result) == strlen (expected) + 1 in test_function()
3013 && memcmp (result, expected, strlen (expected) - 2) == 0 in test_function()
3014 && result[strlen (expected) - 2] == '0' in test_function()
3015 && strcmp (result + strlen (expected) - 1, in test_function()
3018 ASSERT (retval == strlen (result)); in test_function()
3019 free (result); in test_function()
3024 char *result; in test_function() local
3026 my_asprintf (&result, "%Lg %d", -0.03125L, 33, 44, 55); in test_function()
3027 ASSERT (result != NULL); in test_function()
3028 ASSERT (strcmp (result, "-0.03125 33") == 0); in test_function()
3029 ASSERT (retval == strlen (result)); in test_function()
3030 free (result); in test_function()
3034 char *result; in test_function() local
3036 my_asprintf (&result, "%Lg %d", 0.0L, 33, 44, 55); in test_function()
3037 ASSERT (result != NULL); in test_function()
3038 ASSERT (strcmp (result, "0 33") == 0); in test_function()
3039 ASSERT (retval == strlen (result)); in test_function()
3040 free (result); in test_function()
3044 char *result; in test_function() local
3046 my_asprintf (&result, "%Lg %d", minus_zerol, 33, 44, 55); in test_function()
3047 ASSERT (result != NULL); in test_function()
3049 ASSERT (strcmp (result, "-0 33") == 0); in test_function()
3050 ASSERT (retval == strlen (result)); in test_function()
3051 free (result); in test_function()
3055 char *result; in test_function() local
3057 my_asprintf (&result, "%Lg %d", Infinityl (), 33, 44, 55); in test_function()
3058 ASSERT (result != NULL); in test_function()
3059 ASSERT (strcmp (result, "inf 33") == 0 in test_function()
3060 || strcmp (result, "infinity 33") == 0); in test_function()
3061 ASSERT (retval == strlen (result)); in test_function()
3062 free (result); in test_function()
3066 char *result; in test_function() local
3068 my_asprintf (&result, "%Lg %d", - Infinityl (), 33, 44, 55); in test_function()
3069 ASSERT (result != NULL); in test_function()
3070 ASSERT (strcmp (result, "-inf 33") == 0 in test_function()
3071 || strcmp (result, "-infinity 33") == 0); in test_function()
3072 ASSERT (retval == strlen (result)); in test_function()
3073 free (result); in test_function()
3077 char *result; in test_function() local
3079 my_asprintf (&result, "%Lg %d", NaNl (), 33, 44, 55); in test_function()
3080 ASSERT (result != NULL); in test_function()
3081 ASSERT (strlen (result) >= 3 + 3 in test_function()
3082 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
3083 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
3084 ASSERT (retval == strlen (result)); in test_function()
3085 free (result); in test_function()
3091 char *result; in test_function() local
3093 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3094 ASSERT (result != NULL); in test_function()
3095 ASSERT (strlen (result) >= 3 + 3 in test_function()
3096 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
3097 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
3098 ASSERT (retval == strlen (result)); in test_function()
3099 free (result); in test_function()
3105 char *result; in test_function() local
3107 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3108 ASSERT (result != NULL); in test_function()
3109 ASSERT (strlen (result) >= 3 + 3 in test_function()
3110 && strisnan (result, 0, strlen (result) - 3, 0) in test_function()
3111 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
3112 ASSERT (retval == strlen (result)); in test_function()
3113 free (result); in test_function()
3119 char *result; in test_function() local
3121 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3122 ASSERT (result != NULL); in test_function()
3123 ASSERT (retval == strlen (result)); in test_function()
3124 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
3125 free (result); in test_function()
3130 char *result; in test_function() local
3132 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3133 ASSERT (result != NULL); in test_function()
3134 ASSERT (retval == strlen (result)); in test_function()
3135 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
3136 free (result); in test_function()
3141 char *result; in test_function() local
3143 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3144 ASSERT (result != NULL); in test_function()
3145 ASSERT (retval == strlen (result)); in test_function()
3146 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
3147 free (result); in test_function()
3152 char *result; in test_function() local
3154 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3155 ASSERT (result != NULL); in test_function()
3156 ASSERT (retval == strlen (result)); in test_function()
3157 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
3158 free (result); in test_function()
3163 char *result; in test_function() local
3165 my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55); in test_function()
3166 ASSERT (result != NULL); in test_function()
3167 ASSERT (retval == strlen (result)); in test_function()
3168 ASSERT (3 < retval && strcmp (result + retval - 3, " 33") == 0); in test_function()
3169 free (result); in test_function()
3174 char *result; in test_function() local
3176 my_asprintf (&result, "%10Lg %d", 1.75L, 33, 44, 55); in test_function()
3177 ASSERT (result != NULL); in test_function()
3178 ASSERT (strcmp (result, " 1.75 33") == 0); in test_function()
3179 ASSERT (retval == strlen (result)); in test_function()
3180 free (result); in test_function()
3184 char *result; in test_function() local
3186 my_asprintf (&result, "%-10Lg %d", 1.75L, 33, 44, 55); in test_function()
3187 ASSERT (result != NULL); in test_function()
3188 ASSERT (strcmp (result, "1.75 33") == 0); in test_function()
3189 ASSERT (retval == strlen (result)); in test_function()
3190 free (result); in test_function()
3194 char *result; in test_function() local
3196 my_asprintf (&result, "%+Lg %d", 1.75L, 33, 44, 55); in test_function()
3197 ASSERT (result != NULL); in test_function()
3198 ASSERT (strcmp (result, "+1.75 33") == 0); in test_function()
3199 ASSERT (retval == strlen (result)); in test_function()
3200 free (result); in test_function()
3204 char *result; in test_function() local
3206 my_asprintf (&result, "% Lg %d", 1.75L, 33, 44, 55); in test_function()
3207 ASSERT (result != NULL); in test_function()
3208 ASSERT (strcmp (result, " 1.75 33") == 0); in test_function()
3209 ASSERT (retval == strlen (result)); in test_function()
3210 free (result); in test_function()
3214 char *result; in test_function() local
3216 my_asprintf (&result, "%#Lg %d", 1.75L, 33, 44, 55); in test_function()
3217 ASSERT (result != NULL); in test_function()
3218 ASSERT (strcmp (result, "1.75000 33") == 0); in test_function()
3219 ASSERT (retval == strlen (result)); in test_function()
3220 free (result); in test_function()
3224 char *result; in test_function() local
3226 my_asprintf (&result, "%#.Lg %d", 1.75L, 33, 44, 55); in test_function()
3227 ASSERT (result != NULL); in test_function()
3228 ASSERT (strcmp (result, "2. 33") == 0); in test_function()
3229 ASSERT (retval == strlen (result)); in test_function()
3230 free (result); in test_function()
3234 char *result; in test_function() local
3236 my_asprintf (&result, "%#.Lg %d", 9.75L, 33, 44, 55); in test_function()
3237 ASSERT (result != NULL); in test_function()
3238 ASSERT (strcmp (result, "1.e+01 33") == 0 in test_function()
3239 || strcmp (result, "1.e+001 33") == 0); in test_function()
3240 ASSERT (retval == strlen (result)); in test_function()
3241 free (result); in test_function()
3245 char *result; in test_function() local
3247 my_asprintf (&result, "%010Lg %d", 1234.0L, 33, 44, 55); in test_function()
3248 ASSERT (result != NULL); in test_function()
3249 ASSERT (strcmp (result, "0000001234 33") == 0); in test_function()
3250 ASSERT (retval == strlen (result)); in test_function()
3251 free (result); in test_function()
3255 char *result; in test_function() local
3257 my_asprintf (&result, "%015Lg %d", - Infinityl (), 33, 44, 55); in test_function()
3258 ASSERT (result != NULL); in test_function()
3259 ASSERT (strcmp (result, " -inf 33") == 0 in test_function()
3260 || strcmp (result, " -infinity 33") == 0); in test_function()
3261 ASSERT (retval == strlen (result)); in test_function()
3262 free (result); in test_function()
3266 char *result; in test_function() local
3268 my_asprintf (&result, "%050Lg %d", NaNl (), 33, 44, 55); in test_function()
3269 ASSERT (result != NULL); in test_function()
3270 ASSERT (strlen (result) == 50 + 3 in test_function()
3271 && strisnan (result, strspn (result, " "), strlen (result) - 3, 0) in test_function()
3272 && strcmp (result + strlen (result) - 3, " 33") == 0); in test_function()
3273 ASSERT (retval == strlen (result)); in test_function()
3274 free (result); in test_function()
3278 char *result; in test_function() local
3280 my_asprintf (&result, "%.Lg %d", 1234.0L, 33, 44, 55); in test_function()
3281 ASSERT (result != NULL); in test_function()
3282 ASSERT (strcmp (result, "1e+03 33") == 0 in test_function()
3283 || strcmp (result, "1e+003 33") == 0); in test_function()
3284 ASSERT (retval == strlen (result)); in test_function()
3285 free (result); in test_function()
3289 char *result; in test_function() local
3291 my_asprintf (&result, "%.5Lg %d", 999.951L, 33, 44, 55); in test_function()
3292 ASSERT (result != NULL); in test_function()
3293 ASSERT (strcmp (result, "999.95 33") == 0); in test_function()
3294 ASSERT (retval == strlen (result)); in test_function()
3295 free (result); in test_function()
3299 char *result; in test_function() local
3301 my_asprintf (&result, "%.5Lg %d", 999.996L, 33, 44, 55); in test_function()
3302 ASSERT (result != NULL); in test_function()
3303 ASSERT (strcmp (result, "1000 33") == 0); in test_function()
3304 ASSERT (retval == strlen (result)); in test_function()
3305 free (result); in test_function()
3312 char *result; in test_function() local
3314 my_asprintf (&result, "%d %n", 123, &count, 33, 44, 55); in test_function()
3315 ASSERT (result != NULL); in test_function()
3316 ASSERT (strcmp (result, "123 ") == 0); in test_function()
3317 ASSERT (retval == strlen (result)); in test_function()
3319 free (result); in test_function()
3325 char *result; in test_function() local
3327 my_asprintf (&result, "%2$d %1$d", 33, 55); in test_function()
3328 ASSERT (result != NULL); in test_function()
3329 ASSERT (strcmp (result, "55 33") == 0); in test_function()
3330 ASSERT (retval == strlen (result)); in test_function()
3331 free (result); in test_function()
3337 char *result; in test_function() local
3339 my_asprintf (&result, "%'d %d", 1234567, 99); in test_function()
3340 ASSERT (result != NULL); in test_function()
3341 ASSERT (result[strlen (result) - 1] == '9'); in test_function()
3342 ASSERT (retval == strlen (result)); in test_function()
3343 free (result); in test_function()
3349 char *result; in test_function() local
3351 my_asprintf (&result, "a%*sc", -3, "b"); in test_function()
3352 ASSERT (result != NULL); in test_function()
3353 ASSERT (strcmp (result, "ab c") == 0); in test_function()
3354 ASSERT (retval == strlen (result)); in test_function()
3355 free (result); in test_function()
3359 char *result; in test_function() local
3361 my_asprintf (&result, "a%-*sc", 3, "b"); in test_function()
3362 ASSERT (result != NULL); in test_function()
3363 ASSERT (strcmp (result, "ab c") == 0); in test_function()
3364 ASSERT (retval == strlen (result)); in test_function()
3365 free (result); in test_function()
3369 char *result; in test_function() local
3371 my_asprintf (&result, "a%-*sc", -3, "b"); in test_function()
3372 ASSERT (result != NULL); in test_function()
3373 ASSERT (strcmp (result, "ab c") == 0); in test_function()
3374 ASSERT (retval == strlen (result)); in test_function()
3375 free (result); in test_function()
3381 char *result; in test_function() local
3383 my_asprintf (&result, "%.4000d %d", 1234567, 99); in test_function()
3385 ASSERT (result != NULL); in test_function()
3387 ASSERT (result[i] == '0'); in test_function()
3388 ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); in test_function()
3389 ASSERT (retval == strlen (result)); in test_function()
3390 free (result); in test_function()
3394 char *result; in test_function() local
3396 my_asprintf (&result, "%.*d %d", 4000, 1234567, 99); in test_function()
3398 ASSERT (result != NULL); in test_function()
3400 ASSERT (result[i] == '0'); in test_function()
3401 ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); in test_function()
3402 ASSERT (retval == strlen (result)); in test_function()
3403 free (result); in test_function()
3407 char *result; in test_function() local
3409 my_asprintf (&result, "%.4000d %d", -1234567, 99); in test_function()
3411 ASSERT (result != NULL); in test_function()
3412 ASSERT (result[0] == '-'); in test_function()
3414 ASSERT (result[1 + i] == '0'); in test_function()
3415 ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0); in test_function()
3416 ASSERT (retval == strlen (result)); in test_function()
3417 free (result); in test_function()
3421 char *result; in test_function() local
3423 my_asprintf (&result, "%.4000u %d", 1234567, 99); in test_function()
3425 ASSERT (result != NULL); in test_function()
3427 ASSERT (result[i] == '0'); in test_function()
3428 ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0); in test_function()
3429 ASSERT (retval == strlen (result)); in test_function()
3430 free (result); in test_function()
3434 char *result; in test_function() local
3436 my_asprintf (&result, "%.4000o %d", 1234567, 99); in test_function()
3438 ASSERT (result != NULL); in test_function()
3440 ASSERT (result[i] == '0'); in test_function()
3441 ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0); in test_function()
3442 ASSERT (retval == strlen (result)); in test_function()
3443 free (result); in test_function()
3447 char *result; in test_function() local
3449 my_asprintf (&result, "%.4000x %d", 1234567, 99); in test_function()
3451 ASSERT (result != NULL); in test_function()
3453 ASSERT (result[i] == '0'); in test_function()
3454 ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0); in test_function()
3455 ASSERT (retval == strlen (result)); in test_function()
3456 free (result); in test_function()
3460 char *result; in test_function() local
3462 my_asprintf (&result, "%#.4000x %d", 1234567, 99); in test_function()
3464 ASSERT (result != NULL); in test_function()
3465 ASSERT (result[0] == '0'); in test_function()
3466 ASSERT (result[1] == 'x'); in test_function()
3468 ASSERT (result[2 + i] == '0'); in test_function()
3469 ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0); in test_function()
3470 ASSERT (retval == strlen (result)); in test_function()
3471 free (result); in test_function()
3475 char *result; in test_function() local
3477 my_asprintf (&result, "%.4000f %d", 1.0, 99); in test_function()
3479 ASSERT (result != NULL); in test_function()
3480 ASSERT (result[0] == '1'); in test_function()
3481 ASSERT (result[1] == '.'); in test_function()
3483 ASSERT (result[2 + i] == '0'); in test_function()
3484 ASSERT (strcmp (result + 2 + 4000, " 99") == 0); in test_function()
3485 ASSERT (retval == strlen (result)); in test_function()
3486 free (result); in test_function()
3490 char *result; in test_function() local
3492 my_asprintf (&result, "%.511f %d", 1.0, 99); in test_function()
3494 ASSERT (result != NULL); in test_function()
3495 ASSERT (result[0] == '1'); in test_function()
3496 ASSERT (result[1] == '.'); in test_function()
3498 ASSERT (result[2 + i] == '0'); in test_function()
3499 ASSERT (strcmp (result + 2 + 511, " 99") == 0); in test_function()
3500 ASSERT (retval == strlen (result)); in test_function()
3501 free (result); in test_function()
3506 char *result; in test_function() local
3513 retval = my_asprintf (&result, "%.4000s %d", input, 99); in test_function()
3514 ASSERT (result != NULL); in test_function()
3515 ASSERT (memcmp (result, input, 4000) == 0); in test_function()
3516 ASSERT (strcmp (result + 4000, " 99") == 0); in test_function()
3517 ASSERT (retval == strlen (result)); in test_function()
3518 free (result); in test_function()
3532 char *result; in test_function() local
3537 retval = my_asprintf (&result, "%.*s", (int) i, block); in test_function()
3538 ASSERT (result != NULL); in test_function()
3539 ASSERT (memcmp (result, block, i) == 0); in test_function()
3540 ASSERT (result[i] == '\0'); in test_function()
3541 ASSERT (retval == strlen (result)); in test_function()
3542 free (result); in test_function()
3554 char *result; in test_function() local
3560 retval = my_asprintf (&result, "%.*ls", (int) i, block); in test_function()
3561 ASSERT (result != NULL); in test_function()
3562 ASSERT (memcmp (result, "abcdefgh", i) == 0); in test_function()
3563 ASSERT (result[i] == '\0'); in test_function()
3564 ASSERT (retval == strlen (result)); in test_function()
3565 free (result); in test_function()
3573 my_asprintf (char **result, const char *format, ...) in my_asprintf() argument
3579 ret = vasprintf (result, format, args); in my_asprintf()