X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_rate_policy.cpp;h=755bfca029e4e95f3b90ddb13e06e08740c86df5;hb=048c37a118effaad73731390c6cbef8a138ce524;hp=acfe159039fdf79e748be3e53873b979fb27b071;hpb=740da7d5000ca1ffdcf14bda5096bf7ccfb86bdd;p=lttng-tools.git diff --git a/tests/unit/test_rate_policy.cpp b/tests/unit/test_rate_policy.cpp index acfe15903..755bfca02 100644 --- a/tests/unit/test_rate_policy.cpp +++ b/tests/unit/test_rate_policy.cpp @@ -14,9 +14,9 @@ #include -#include -#include -#include +#include +#include +#include #include /* For error.h. */ @@ -131,6 +131,7 @@ static void test_rate_policy_every_n(void) lttng_rate_policy_destroy(policy_a); lttng_rate_policy_destroy(policy_b); lttng_rate_policy_destroy(policy_c); + lttng_rate_policy_destroy(policy_from_buffer); lttng_payload_reset(&payload); } @@ -198,10 +199,6 @@ static void test_rate_policy_once_after_n(void) " Getting threshold C"); /* is_equal tests */ - /* TODO: this is the behaviour introduced by the - * lttng_condition_is_equal back in 2017 do we want to fix this and - * return true if both are NULL? - */ ok(false == lttng_rate_policy_is_equal(NULL, NULL), "is equal (NULL,NULL)"); ok(false == lttng_rate_policy_is_equal(policy_a, NULL), @@ -240,10 +237,11 @@ static void test_rate_policy_once_after_n(void) lttng_rate_policy_destroy(policy_a); lttng_rate_policy_destroy(policy_b); lttng_rate_policy_destroy(policy_c); + lttng_rate_policy_destroy(policy_from_buffer); lttng_payload_reset(&payload); } -int main(int argc, const char *argv[]) +int main(void) { plan_tests(NUM_TESTS); test_rate_policy_every_n();