root/lib/common/tests/flags/pcmk__set_flags_as_test.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. set_flags

   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 
  12 #include <crm/common/unittest_internal.h>
  13 
  14 static void
  15 set_flags(void **state) {
     /* [previous][next][first][last][top][bottom][index][help] */
  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 
  24 PCMK__UNIT_TEST(NULL, NULL,
  25                 cmocka_unit_test(set_flags))

/* [previous][next][first][last][top][bottom][index][help] */