19 all_set(
void **state) {
20 assert_false(pcmk_all_flags_set(0x000, 0x003));
21 assert_true(pcmk_all_flags_set(0x00f, 0x003));
22 assert_false(pcmk_all_flags_set(0x00f, 0x010));
23 assert_false(pcmk_all_flags_set(0x00f, 0x011));
24 assert_true(pcmk_all_flags_set(0x000, 0x000));
25 assert_true(pcmk_all_flags_set(0x00f, 0x000));
29 one_is_set(
void **state) {
36 main(
int argc,
char **argv)
38 const struct CMUnitTest tests[] = {
39 cmocka_unit_test(all_set),
40 cmocka_unit_test(one_is_set),
43 cmocka_set_message_output(CM_OUTPUT_TAP);
44 return cmocka_run_group_tests(tests, NULL, NULL);
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int main(int argc, char **argv)