17 empty_list(
void **state) {
18 assert_false(pcmk__list_of_1(NULL));
22 singleton_list(
void **state) {
25 lst = g_list_append(lst, strdup(
"abc"));
26 assert_true(pcmk__list_of_1(lst));
28 g_list_free_full(lst, free);
32 longer_list(
void **state) {
35 lst = g_list_append(lst, strdup(
"abc"));
36 lst = g_list_append(lst, strdup(
"xyz"));
37 assert_false(pcmk__list_of_1(lst));
39 g_list_free_full(lst, free);
43 cmocka_unit_test(empty_list),
44 cmocka_unit_test(singleton_list),
45 cmocka_unit_test(longer_list))
PCMK__UNIT_TEST(NULL, NULL, cmocka_unit_test(bad_input), cmocka_unit_test(not_found), cmocka_unit_test(find_attrB), cmocka_unit_test(find_attrA_matching))