about summary refs log tree commit diff
path: root/misc/tst-ldbl-warn.c
Commit message (Collapse)AuthorAgeFilesLines
* Use TEST_COMPARE_STRING in recently added testGabriel F. T. Gomes2018-11-081-5/+1
| | | | | | | | | | | | | | | | | | | | | | | The commit commit 1df872fd74f730bcae3df201a229195445d2e18a Author: Florian Weimer <fweimer@redhat.com> Date: Wed Nov 7 12:42:44 2018 +0100 support: Implement TEST_COMPARE_STRING added the new macro TEST_COMPARE_STRING, which compares the output of functions under test against expected strings, and, when there's a mismatch, automatically reports an error and prints the differences. This patch adapts recently added test cases to use this new macro. Tested for powerpc64le (as is, and locally patched to intentionally fail and produce error output). * argp/tst-ldbl-argp.c (do_one_test): Use TEST_COMPARE_STRING, instead of manually comparing and reporting mismatching strings. * misc/tst-ldbl-error.c (do_one_test): Likewise. * misc/tst-ldbl-warn.c (do_one_test): Likewise.
* Add test for warn, warnx, vwarn, and vwarnx with floating-point parametersGabriel F. T. Gomes2018-11-061-0/+120
Similarly to what has been done for argp_error and argp_failure, this patch patch adds new tests for the warn, warnx, vwarn, and vwarnx functions. The new tests use the format string to request the conversion of long double parameters into string. Currently, these tests only check that the default format of the long double type works. Future patches will extend the test for platforms that can have an optional format for long double. Tested for powerpc64le. * misc/Makefile (tests): Add tst-ldbl-warn. * misc/tst-ldbl-warn.c: New file.