procps/src
Craig Small 9b2f49166b tests: Dont compare floats with ==
Comparing floats with == is bad and I should feel bad I did this.
The problem is if something is close to, but not quite the exact
same fails tests.

I have used an epsilon of 1 because we don't care about accuracy,
just that the function works well enough.

References:
 issue procps-ng/procps#271
 https://how-to.fandom.com/wiki/Howto_compare_floating_point_numbers_in_the_C_programming_language

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2023-03-01 17:20:42 +11:00
..
ps misc: Update the copyrights for the ps and top sources 2023-02-08 16:53:04 +11:00
tests tests: Dont compare floats with == 2023-03-01 17:20:42 +11:00
top misc: Update the copyrights for the ps and top sources 2023-02-08 16:53:04 +11:00
free.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
kill.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
pgrep.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
pidof.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
pmap.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
pwdx.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
skill.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
slabtop.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
sysctl.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
tload.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
uptime.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
vmstat.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
w.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00
watch.c misc: Update the copyrights of files 2023-02-07 21:09:48 +11:00