X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_action.c;fp=tests%2Funit%2Ftest_action.c;h=697f1a7103d5d680ca1284a499ee80256a6f6824;hb=9cff59ec0a1724d7b2a3f38dfa7838357e150dba;hp=0000000000000000000000000000000000000000;hpb=e44b56455ab8615addd9d802591bd1f892375561;p=lttng-tools.git diff --git a/tests/unit/test_action.c b/tests/unit/test_action.c new file mode 100644 index 000000000..697f1a710 --- /dev/null +++ b/tests/unit/test_action.c @@ -0,0 +1,51 @@ +/* + * test_action.c + * + * Unit tests for the notification API. + * + * Copyright (C) 2017 Jonathan Rajotte + * + * SPDX-License-Identifier: MIT + * + */ + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +/* For error.h */ +int lttng_opt_quiet = 1; +int lttng_opt_verbose; +int lttng_opt_mi; + +#define NUM_TESTS 2 + +static void test_action_notify(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); +} + +int main(int argc, const char *argv[]) +{ + plan_tests(NUM_TESTS); + test_action_notify(); + return exit_status(); +}