pacemaker 2.1.6-6fdc9deea29
Scalable High-Availability cluster resource manager
pcmk__set_flags_as_test.c
Go to the documentation of this file.
1/*
2 * Copyright 2020-2021 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 General Public License version 2
7 * or later (GPLv2+) WITHOUT ANY WARRANTY.
8 */
9
10#include <crm_internal.h>
11
13
14static void
15set_flags(void **state) {
16 assert_int_equal(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
17 "test", 0x0f0, 0x00f, NULL), 0x0ff);
18 assert_int_equal(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
19 "test", 0x0f0, 0xf0f, NULL), 0xfff);
20 assert_int_equal(pcmk__set_flags_as(__func__, __LINE__, LOG_TRACE, "Test",
21 "test", 0x0f0, 0xfff, NULL), 0xfff);
22}
23
24PCMK__UNIT_TEST(NULL, NULL,
25 cmocka_unit_test(set_flags))
#define LOG_TRACE
Definition: logging.h:37
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))