summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25424fc)
raw | patch | inline | side by side (parent: 25424fc)
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 42f45ce6a71a989d9a30ca9497f7b13c516ce96e..96b6ba9c30bdc13d5e316d3cd185f169b72d0421 100644 (file)
--- a/src/testing.h
+++ b/src/testing.h
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); \