summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Small <csmall@dropbear.xyz>2023-03-21 22:22:33 +1100
committerCraig Small <csmall@dropbear.xyz>2023-03-21 22:22:33 +1100
commit1f910eeb0ed608c2c91ed615352c5a9d25f01866 (patch)
treee779216446ec6178bce771c983cdf0be90b6d600
parentbb7e161d5a06f1bbd5a98cf868eab356c6c1bac2 (diff)
downloadprocps-ng-1f910eeb0ed608c2c91ed615352c5a9d25f01866.tar.gz
Fix test for double test
References: issue procps-ng/procps#271
-rw-r--r--src/tests/test_strtod_nol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test_strtod_nol.c b/src/tests/test_strtod_nol.c
index 8e5c524..408cf46 100644
--- a/src/tests/test_strtod_nol.c
+++ b/src/tests/test_strtod_nol.c
@@ -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;