[PATCH v8 3/3] Add tests for strfrom functions
Joseph Myers
joseph@codesourcery.com
Fri Oct 14 21:40:00 GMT 2016
On Fri, 14 Oct 2016, Gabriel F. T. Gomes wrote:
> + double val;
Some of the test arrays are still using double rather than using the type
under test in a type-generic way (thus, either having multiple arrays or
having a struct member per type as in the tst-strtod-round tests).
> +struct val
> +{
> + float f;
> + double d;
> + long double ld;
> +};
Although this one has a struct with multiple types, it's not properly
type-generic. I'd expect use of something like STRUCT_FOREACH_FLOAT_FTYPE
(in tst-strtod-round-skeleton.c) to define such a struct, and then such a
macro concatenting a suffix to the constants to fill in the initializers.
If the tests are properly type-generic, only GEN_TEST_STRTOD_FOREACH /
STRTOD_TEST_FOREACH in tst-strtod.h should likely need to change to make
them cover an extra type.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list