This source file includes following definitions.
- set_attr
 
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 #include <crm_internal.h>
  11 
  12 #include <crm/common/unittest_internal.h>
  13 #include <crm/common/xml_internal.h>
  14 #include <crm/msg_xml.h>
  15 
  16 static void
  17 set_attr(void **state)
     
  18 {
  19     xmlNode *node = string2xml("<node/>");
  20 
  21     pcmk__xe_set_bool_attr(node, "a", true);
  22     pcmk__xe_set_bool_attr(node, "b", false);
  23 
  24     assert_string_equal(crm_element_value(node, "a"), XML_BOOLEAN_TRUE);
  25     assert_string_equal(crm_element_value(node, "b"), XML_BOOLEAN_FALSE);
  26 
  27     free_xml(node);
  28 }
  29 
  30 PCMK__UNIT_TEST(NULL, NULL,
  31                 cmocka_unit_test(set_attr))