16 g_assert_cmpint(pcmk_all_flags_set(0x000, 0x003), ==,
false);
17 g_assert_cmpint(pcmk_all_flags_set(0x00f, 0x003), ==,
true);
18 g_assert_cmpint(pcmk_all_flags_set(0x00f, 0x010), ==,
false);
19 g_assert_cmpint(pcmk_all_flags_set(0x00f, 0x011), ==,
false);
20 g_assert_cmpint(pcmk_all_flags_set(0x000, 0x000), ==,
true);
21 g_assert_cmpint(pcmk_all_flags_set(0x00f, 0x000), ==,
true);
27 g_assert_cmpint(
pcmk_is_set(0x00f, 0x001), ==,
true);
28 g_assert_cmpint(
pcmk_is_set(0x00f, 0x010), ==,
false);
32 main(
int argc,
char **argv)
34 g_test_init(&argc, &argv, NULL);
36 g_test_add_func(
"/common/flags/all_set/all_set", all_set);
37 g_test_add_func(
"/common/flags/all_set/is_set", one_is_set);
#define pcmk_is_set(g, f)
Convenience alias for pcmk_all_flags_set(), to check single flag.
int main(int argc, char **argv)