author | Florian Forster <octo@collectd.org> | |
Fri, 10 Jul 2015 11:14:43 +0000 (13:14 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 10 Jul 2015 11:14:43 +0000 (13:14 +0200) | ||
commit | 08a2128ac248150b50f9c54c9c71f573e54df3c3 | |
tree | a2c6f18c7ecc5ce793b46fb40499be673ab859e9 | tree | snapshot |
parent | 2e0fdac6f329c2ddf556aa47f45156e1544332a5 | commit | diff |
Testing: Return failure from OK1() and other fixes.
* The tests for common and meta_data logged "not ok" but didn't signal
failure because OK1() didn't include a return(-1) line. Adding this line
caused some restructuring of the utils_vl_lookup test, because it used
that macro in non-int functions.
* Fix DBLEQ() to work correctly with an expected NaN. Previously, the
if condition would fall through to the "expect != actual" part, which
is true for "NaN != NaN".
* Let the mock cdtime() return a non-zero value, as the (invalid) zero
value is used in parse_values() to detect whether the time has been
parsed already. This lead to the "N:..." tests failing.
* Correct the expected behavior of meta_data_add_*() when keys already
exist: they're replaced rather than causing an error.
* The tests for common and meta_data logged "not ok" but didn't signal
failure because OK1() didn't include a return(-1) line. Adding this line
caused some restructuring of the utils_vl_lookup test, because it used
that macro in non-int functions.
* Fix DBLEQ() to work correctly with an expected NaN. Previously, the
if condition would fall through to the "expect != actual" part, which
is true for "NaN != NaN".
* Let the mock cdtime() return a non-zero value, as the (invalid) zero
value is used in parse_values() to detect whether the time has been
parsed already. This lead to the "N:..." tests failing.
* Correct the expected behavior of meta_data_add_*() when keys already
exist: they're replaced rather than causing an error.