pacemaker 2.1.1-77db578727
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
pcmk__set_flags_as_test.c
Go to the documentation of this file.
1/*
2 * Copyright 2020 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#include <crm_internal.h>
11
12static void
13set_flags(void) {
14 g_assert_cmphex(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
15 "test", 0x0f0, 0x00f, NULL), ==, 0x0ff);
16 g_assert_cmphex(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
17 "test", 0x0f0, 0xf0f, NULL), ==, 0xfff);
18 g_assert_cmphex(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
19 "test", 0x0f0, 0xfff, NULL), ==, 0xfff);
20}
21
22int
23main(int argc, char **argv)
24{
25 g_test_init(&argc, &argv, NULL);
26
27 g_test_add_func("/common/flags/set/set_flags", set_flags);
28 return g_test_run();
29}
#define LOG_TRACE
Definition logging.h:36
int main(int argc, char **argv)