This source file includes following definitions.
- null_create_fn
- invalid_params
- non_null_formatters
1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <crm/common/unittest_internal.h>
13 #include <crm/common/output_internal.h>
14
15 static pcmk__output_t *
16 null_create_fn(char **argv) {
17 return NULL;
18 }
19
20 static void
21 invalid_params(void **state) {
22
23
24
25 pcmk__unregister_formats();
26 assert_null(pcmk__output_formatters());
27 }
28
29 static void
30 non_null_formatters(void **state) {
31 pcmk__register_format(NULL, "fake", null_create_fn, NULL);
32
33 pcmk__unregister_formats();
34 assert_null(pcmk__output_formatters());
35 }
36
37 PCMK__UNIT_TEST(NULL, NULL,
38 cmocka_unit_test(invalid_params),
39 cmocka_unit_test(non_null_formatters))