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
  2. main

   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 
  12 static void
  13 set_flags(void) {
     /* [previous][next][first][last][top][bottom][index][help] */
  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 
  22 int
  23 main(int argc, char **argv)
     /* [previous][next][first][last][top][bottom][index][help] */
  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 }

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