tests - remove one of the eina strtod tests as libc is failing

see the comments above the test explaining why it's removed (libc
fails, not eina and having our tests fail because eina is a bit more
robust than libc is not a sane thing to have). but here is the comment
for git history spelunking:

this test isn't viable because libc actually fails the conversion (testing
glibc 2.28 on arch linux). either libc doesn't like the space at the start
thus doesn't skip it but assumes END of numbver string thus not converting
and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
way this test shows eina to be more robust and do some kind of conversion
and libc to fail and return NULL from strtod into the string pointer. it
also doesnt return an infinite fp thus hitting the default: case and thus
failing etc. ... so all in all remove the test as all it does it cause
failures and if anything shows libc to be failing more than eina.

@fix
This commit is contained in:
Carsten Haitzler 2019-04-07 14:47:35 +01:00
parent 1f402946a2
commit 2178258105
1 changed files with 14 additions and 5 deletions

View File

@ -189,10 +189,10 @@ _eina_convert_strtod_c_check(const char *str)
(fpclassify(d1) != FP_NORMAL));
if (!EINA_DBL_EQ(d1,d2) || (e1 != e2))
{
printf(" FP_NORMAL\n");
printf(" ERR: %s, %s\n", str, strerror(errno));
printf(" E1 **%.6f**, **%g**, %s\n", d1, d1, e1 ? e1 : "");
printf(" E2 **%.6f**, **%g**, %s\n", d2, d2, e2 ? e2 : "");
fprintf(stderr, " FP_NORMAL\n");
fprintf(stderr, " ERR: %s, %s\n", str, strerror(errno));
fprintf(stderr, " E1 **%.6f**, **%g**, %s\n", d1, d1, e1 ? e1 : "");
fprintf(stderr, " E2 **%.6f**, **%g**, %s\n", d2, d2, e2 ? e2 : "");
if (!EINA_DBL_EQ(d1,d2)) printf("different value\n");
if (e1 != e2) printf("different end position\n");
}
@ -250,7 +250,16 @@ EFL_START_TEST(eina_convert_strtod_c_simple)
_eina_convert_strtod_c_check("2.2250738585072014e-308");
_eina_convert_strtod_c_check(" NaNfoo");
_eina_convert_strtod_c_check(" -INFfoo");
_eina_convert_strtod_c_check(" InFiNiTyfoo");
// this test isn't viable because libc actually fails the conversion (testing
// glibc 2.28 on arch linux). either libc doesn't like the space at the start
// thus doesn't skip it but assumes END of numbver string thus not converting
// and returning NULL, or it doesn't like InFiNiTyfoo in some way, but either
// way this test shows eina to be more robust and do some kind of conversion
// and libc to fail and return NULL from strtod into the string pointer. it
// also doesnt return an infinite fp thus hitting the default: case and thus
// failing etc. ... so all in all remove the test as all it does it cause
// failures and if anything shows libc to be failing more than eina.
// _eina_convert_strtod_c_check(" InFiNiTyfoo");
setlocale(LC_ALL, old);
}
EFL_END_TEST