X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Fcommon_test.c;h=0ee4e7e0eb2c6823e81f32063ceff48eaca8c127;hb=08a2128ac248150b50f9c54c9c71f573e54df3c3;hp=d34e4112ee3f27577184054937c4869bfd736c03;hpb=130316f078cadab03f6bbbbd6a8cd5cee77dc558;p=collectd.git diff --git a/src/daemon/common_test.c b/src/daemon/common_test.c index d34e4112..0ee4e7e0 100644 --- a/src/daemon/common_test.c +++ b/src/daemon/common_test.c @@ -328,11 +328,11 @@ DEF_TEST(parse_values) }; int status = parse_values (cases[i].buffer, &vl, &ds); - OK(status == cases[i].status); + EXPECT_INTEQ (cases[i].status, status); if (status != 0) continue; - OK(cases[i].value == vl.values[0].gauge); + DBLEQ (cases[i].value, vl.values[0].gauge); } return (0); @@ -362,15 +362,15 @@ DEF_TEST(value_to_rate) for (i = 0; i < STATIC_ARRAY_SIZE (cases); i++) { value_to_rate_state_t state = { cases[i].v0, TIME_T_TO_CDTIME_T (cases[i].t0) }; - value_t got; + gauge_t got; if (cases[i].t0 == 0) { - OK(value_to_rate (&got, cases[i].v1.derive, &state, cases[i].ds_type, TIME_T_TO_CDTIME_T (cases[i].t1)) == EAGAIN); + OK(value_to_rate (&got, cases[i].v1, cases[i].ds_type, TIME_T_TO_CDTIME_T(cases[i].t1), &state) == EAGAIN); continue; } - OK(value_to_rate (&got, cases[i].v1.derive, &state, cases[i].ds_type, TIME_T_TO_CDTIME_T (cases[i].t1)) == 0); - DBLEQ(cases[i].want, got.gauge); + OK(value_to_rate (&got, cases[i].v1, cases[i].ds_type, TIME_T_TO_CDTIME_T(cases[i].t1), &state) == 0); + DBLEQ(cases[i].want, got); } return 0;