Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / tests / unit / test_notification.c
index 5e50eaa4c7e831f754c6f6ceac12c442f2497657..a44c8ef6718b9ba4808e1387565617eb060c48d6 100644 (file)
@@ -9,7 +9,6 @@
  *
  */
 
-#include <assert.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <string.h>
 #include <lttng/notification/notification.h>
 #include <lttng/trigger/trigger.h>
 
+#include <common/macros.h>
+
 /* For error.h */
 int lttng_opt_quiet = 1;
 int lttng_opt_verbose;
 int lttng_opt_mi;
 
-#define NUM_TESTS 182
+#define NUM_TESTS 180
 
 static void test_condition_buffer_usage(
                struct lttng_condition *buffer_usage_condition)
@@ -43,7 +44,7 @@ static void test_condition_buffer_usage(
        double threshold_ratio;
        uint64_t threshold_bytes;
 
-       assert(buffer_usage_condition);
+       LTTNG_ASSERT(buffer_usage_condition);
 
        diag("Validating initialization");
        status = lttng_condition_buffer_usage_get_threshold_ratio(buffer_usage_condition, &threshold_ratio);
@@ -277,16 +278,6 @@ static void test_condition_buffer_usage_high(void)
        lttng_condition_destroy(buffer_usage_high);
 }
 
-static void test_action(void)
-{
-       struct lttng_action *notify_action = NULL;
-
-       notify_action = lttng_action_notify_create();
-       ok(notify_action, "Create notify action");
-       ok(lttng_action_get_type(notify_action) == LTTNG_ACTION_TYPE_NOTIFY, "Action has type LTTNG_ACTION_TYPE_NOTIFY");
-       lttng_action_destroy(notify_action);
-}
-
 static void test_trigger(void)
 {
        struct lttng_action *notify_action = NULL;
@@ -317,7 +308,6 @@ int main(int argc, const char *argv[])
        plan_tests(NUM_TESTS);
        test_condition_buffer_usage_low();
        test_condition_buffer_usage_high();
-       test_action();
        test_trigger();
        return exit_status();
 }
This page took 0.032707 seconds and 4 git commands to generate.