Fix test for double test

References:
  issue procps-ng/procps#271
This commit is contained in:
Craig Small 2023-03-21 22:22:33 +11:00
parent bb7e161d5a
commit 1f910eeb0e

View File

@ -39,8 +39,8 @@ int main(int argc, char *argv[])
double val;
for(i=0; tests[i].string != NULL; i++) {
if(strtod_nol_or_err(tests[i].string, "Cannot parse number") !=
tests[i].result) {
if(!dequal (strtod_nol_or_err(tests[i].string, "Cannot parse number"),
tests[i].result)) {
fprintf(stderr, "FAIL: strtod_nol_or_err(\"%s\") != %f\n",
tests[i].string, tests[i].result);
return EXIT_FAILURE;