projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25424fc
)
src/testing.h: Fix result of EXPECT_EQ_DOUBLE() when actual is NAN.
author
Florian Forster
<octo@collectd.org>
Mon, 15 May 2017 15:25:44 +0000
(17:25 +0200)
committer
Florian Forster
<octo@collectd.org>
Tue, 16 May 2017 07:07:09 +0000
(09:07 +0200)
src/testing.h
patch
|
blob
|
history
diff --git
a/src/testing.h
b/src/testing.h
index
42f45ce
..
96b6ba9
100644
(file)
--- a/
src/testing.h
+++ b/
src/testing.h
@@
-104,7
+104,8
@@
static int check_count__ = 0;
do { \
double want__ = (double)expect; \
double got__ = (double)actual; \
- if (isnan(want__) && !isnan(got__)) { \
+ if ((isnan(want__) && !isnan(got__)) || \
+ (!isnan(want__) && isnan(got__))) { \
printf("not ok %i - %s = %.15g, want %.15g\n", ++check_count__, #actual, \
got__, want__); \
return (-1); \