17 null_args(
void **state)
25 assert_ptr_equal(xml->properties, NULL);
31 no_source_attrs(
void **state)
39 assert_ptr_equal(
target->properties, NULL);
52 copy_one(
void **state)
69 copy_multiple(
void **state)
94 overwrite(
void **state)
112 no_overwrite(
void **state)
138 score_update(
void **state)
143 crm_xml_add(src,
"plus_plus_attr",
"plus_plus_attr++");
144 crm_xml_add(src,
"plus_two_attr",
"plus_two_attr+=2");
158 no_score_update(
void **state)
163 crm_xml_add(src,
"plus_plus_attr",
"plus_plus_attr++");
164 crm_xml_add(src,
"plus_two_attr",
"plus_two_attr+=2");
181 cmocka_unit_test(null_args),
182 cmocka_unit_test(no_source_attrs),
183 cmocka_unit_test(copy_one),
184 cmocka_unit_test(copy_multiple),
185 cmocka_unit_test(overwrite),
186 cmocka_unit_test(no_overwrite),
187 cmocka_unit_test(score_update),
188 cmocka_unit_test(no_score_update));
int pcmk__xe_copy_attrs(xmlNode *target, const xmlNode *src, uint32_t flags)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
int pcmk__xml_test_setup_group(void **state)
void pcmk__xe_remove_attr(xmlNode *element, const char *name)
PCMK__UNIT_TEST(pcmk__xml_test_setup_group, NULL, cmocka_unit_test(null_args), cmocka_unit_test(no_source_attrs), cmocka_unit_test(copy_one), cmocka_unit_test(copy_multiple), cmocka_unit_test(overwrite), cmocka_unit_test(no_overwrite), cmocka_unit_test(score_update), cmocka_unit_test(no_score_update))
void free_xml(xmlNode *child)
void pcmk__xe_set_props(xmlNodePtr node,...) G_GNUC_NULL_TERMINATED
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
Don't overwrite existing values.