See https://gitlab.com/procps-ng/procps/-/issues/271 diff -u -r procps-ng-4.0.3.alt/src/tests/test_strtod_nol.c procps-ng-4.0.3/src/tests/test_strtod_nol.c --- procps-ng-4.0.3.alt/src/tests/test_strtod_nol.c 2022-12-18 23:44:18.383960834 +0100 +++ procps-ng-4.0.3/src/tests/test_strtod_nol.c 2023-03-20 16:52:26.680032658 +0100 @@ -1,6 +1,7 @@ #include #include +#include #include "strutils.h" struct strtod_tests { @@ -25,6 +26,11 @@ {NULL, 0.0} }; +#define EPSILON 1.0 // Really not trying for precision here +int dequal(const double d1, const double d2) +{ + return fabs(d1-d2) < EPSILON; +} int main(int argc, char *argv[]) @@ -33,8 +39,8 @@ 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; 8cecd2783'>refslogtreecommitdiff
AgeCommit message (Expand)Author
2024-11-06gnu: libgrapheme: Don't force running the tests....* gnu/packages/suckless.scm (libgrapheme)[arguments]: Remove the #:tests keyword. Change-Id: Idb954594bbaa2947859c667da8731753ca2b3c71 Efraim Flashner
2024-08-31gnu: slock: Add libxcrypt dependency....* gnu/packages/suckless.scm (slock): Add libxcrypt dependency. Change-Id: I022b4886b1b05156d623a6e0b2d9bbffe6af74d4 Josselin Poiret
2024-06-11gnu: dmenu: Update to 0.5.3....* gnu/packages/suckless.scm (dmenu): Update to 0.5.3. Change-Id: Id5b458dbad3349037f78bdb2b20d33cab0d1d646 jgart
2024-06-11gnu: st: Update to 0.9.2....* gnu/packages/suckless.scm (st): Update to 0.9.2. Change-Id: I7d42fbaa0cd5b1989d4c249bdfc0b26e9e048b30 jgart
2024-06-11gnu: dwm: Update to 6.5....* gnu/packages/suckless.scm (dwm): Update to 6.5. Change-Id: I8e9627541abb521d54f4d91ee067d3678ce18b02 jgart