17 value_is_name_plus_plus(
void **state)
19 const char *new_value;
24 assert_string_equal(new_value,
"6");
28 value_is_name_plus_equals_integer(
void **state)
30 const char *new_value;
35 assert_string_equal(new_value,
"7");
41 target_is_NULL(
void **state)
44 const char *new_value;
49 assert_string_equal(new_value,
"5");
53 name_is_NULL(
void **state)
55 const char *new_value;
60 assert_string_equal(new_value,
"5");
64 value_is_NULL(
void **state)
66 const char *new_value;
71 assert_string_equal(new_value,
"5");
77 value_is_wrong_name(
void **state)
79 const char *new_value;
84 assert_string_equal(new_value,
"Y++");
88 value_is_only_an_integer(
void **state)
90 const char *new_value;
95 assert_string_equal(new_value,
"2");
101 variable_is_initialized_to_be_NULL(
void **state)
103 const char *new_value;
108 assert_string_equal(new_value,
"X++");
112 variable_is_initialized_to_be_non_numeric(
void **state)
114 const char *new_value;
119 assert_string_equal(new_value,
"1");
123 variable_is_initialized_to_be_non_numeric_2(
void **state)
125 const char *new_value;
130 assert_string_equal(new_value,
"2");
134 variable_is_initialized_to_be_numeric_and_decimal_point_containing(
void **state)
136 const char *new_value;
141 assert_string_equal(new_value,
"6");
145 variable_is_initialized_to_be_numeric_and_decimal_point_containing_2(
void **state)
147 const char *new_value;
152 assert_string_equal(new_value,
"6");
156 variable_is_initialized_to_be_numeric_and_decimal_point_containing_3(
void **state)
158 const char *new_value;
163 assert_string_equal(new_value,
"6");
167 value_is_non_numeric(
void **state)
169 const char *new_value;
174 assert_string_equal(new_value,
"5");
178 value_is_numeric_and_decimal_point_containing(
void **state)
180 const char *new_value;
185 assert_string_equal(new_value,
"7");
189 value_is_numeric_and_decimal_point_containing_2(
void **state)
191 const char *new_value;
196 assert_string_equal(new_value,
"6");
200 value_is_numeric_and_decimal_point_containing_3(
void **state)
202 const char *new_value;
207 assert_string_equal(new_value,
"6");
213 name_is_undefined(
void **state)
215 const char *new_value;
220 assert_string_equal(new_value,
"X++");
226 assignment_result_is_too_large(
void **state)
228 const char *new_value;
233 printf(
"assignment result is too large %s\n", new_value);
234 assert_string_equal(new_value,
"1000000");
238 cmocka_unit_test(value_is_name_plus_plus),
239 cmocka_unit_test(value_is_name_plus_equals_integer),
240 cmocka_unit_test(target_is_NULL),
241 cmocka_unit_test(name_is_NULL),
242 cmocka_unit_test(value_is_NULL),
243 cmocka_unit_test(value_is_wrong_name),
244 cmocka_unit_test(value_is_only_an_integer),
245 cmocka_unit_test(variable_is_initialized_to_be_NULL),
246 cmocka_unit_test(variable_is_initialized_to_be_non_numeric),
247 cmocka_unit_test(variable_is_initialized_to_be_non_numeric_2),
248 cmocka_unit_test(variable_is_initialized_to_be_numeric_and_decimal_point_containing),
249 cmocka_unit_test(variable_is_initialized_to_be_numeric_and_decimal_point_containing_2),
250 cmocka_unit_test(variable_is_initialized_to_be_numeric_and_decimal_point_containing_3),
251 cmocka_unit_test(value_is_non_numeric),
252 cmocka_unit_test(value_is_numeric_and_decimal_point_containing),
253 cmocka_unit_test(value_is_numeric_and_decimal_point_containing_2),
254 cmocka_unit_test(value_is_numeric_and_decimal_point_containing_3),
255 cmocka_unit_test(name_is_undefined),
256 cmocka_unit_test(assignment_result_is_too_large))
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
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))
void expand_plus_plus(xmlNode *target, const char *name, const char *value)
Update current XML attribute value per parsed integer assignment statement.
const char * crm_element_value(const xmlNode *data, const char *name)
Retrieve the value of an XML attribute.
xmlNode * create_xml_node(xmlNode *parent, const char *name)