16 null_create_fn(
char **argv) {
21 null_create_fn_2(
char **argv) {
26 invalid_params(
void **state) {
33 add_format(
void **state) {
34 GHashTable *formatters = NULL;
38 assert_null(pcmk__output_formatters());
42 formatters = pcmk__output_formatters();
43 assert_int_equal(g_hash_table_size(formatters), 1);
45 value = g_hash_table_lookup(formatters,
"fake");
46 assert_ptr_equal(value, null_create_fn);
52 formatters = pcmk__output_formatters();
53 assert_int_equal(g_hash_table_size(formatters), 1);
55 value = g_hash_table_lookup(formatters,
"fake");
56 assert_ptr_equal(value, null_create_fn_2);
62 cmocka_unit_test(invalid_params),
63 cmocka_unit_test(add_format))
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
Formatted output for pacemaker tools.
#define pcmk__assert_asserts(stmt)
int pcmk__register_format(GOptionGroup *group, const char *name, pcmk__output_factory_t create, const GOptionEntry *options)
void pcmk__unregister_formats(void)
This structure contains everything that makes up a single output formatter.