[PATCH v4 2/3] Refactor strtod tests

Rajalakshmi Srinivasaraghavan raji@linux.vnet.ibm.com
Fri Sep 23 09:44:00 GMT 2016



On 09/23/2016 02:02 AM, Florian Weimer wrote:
> * Gabriel F. T. Gomes:
>
>>   /* Splat n variants of the same test for the various strtod functions.  */
>>   #define GEN_TEST_STRTOD_FOREACH(mfunc, ...)			 \
>> -    mfunc (  f,       float, snprintf,  "", f, f, ##__VA_ARGS__) \
>> -    mfunc (  d,      double, snprintf,  "",  ,  , ##__VA_ARGS__) \
>> -    mfunc ( ld, long double, snprintf, "L", L, l, ##__VA_ARGS__)
>> +    mfunc (  f,       float, strfromf, f, f, ##__VA_ARGS__)	 \
>> +    mfunc (  d,      double, strfromd,  ,  , ##__VA_ARGS__)	 \
>> +    mfunc ( ld, long double, strfroml, L, l, ##__VA_ARGS__)
> Will this lose test coverage for snprintf?
No. stdlib/tst-strtod.h(with snprintf) file is created few months back with
the purpose of refactoring strtod tests and snprintf was not used by
the strtod tests before refactoring too. So changing this to strfrom
should not affect. Also snprintf is still used in math/test-*.h
which adds test coverage.
>
>

-- 
Thanks
Rajalakshmi S



More information about the Libc-alpha mailing list