18 destroy_fn1(gpointer arg)
24 destroy_fn2(gpointer arg)
30 null_cluster(
void **state)
44 assert_ptr_equal(cluster.
destroy, NULL);
48 assert_ptr_equal(cluster.
destroy, NULL);
52 previous_fn_null(
void **state)
60 assert_ptr_equal(cluster.
destroy, destroy_fn1);
64 previous_fn_nonnull(
void **state)
72 assert_ptr_equal(cluster.
destroy, destroy_fn1);
76 cmocka_unit_test(null_cluster),
77 cmocka_unit_test(null_fn),
78 cmocka_unit_test(previous_fn_null),
79 cmocka_unit_test(previous_fn_nonnull))
void(* destroy)(gpointer)
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
int pcmk_cluster_set_destroy_fn(pcmk_cluster_t *cluster, void(*fn)(gpointer))
Set the destroy function for a cluster object.