21 static int default_score = 99;
24 assert_score(
const char *score_s,
int expected_rc,
int expected_score)
32 assert_int_equal(rc, expected_rc);
33 assert_int_equal(score, expected_score);
38 invalid_args(
void **state)
53 null_score_string(
void **state)
59 default_score = -2000000;
62 default_score = 2000000;
69 null_score(
void **state)
88 bad_input(
void **state)
96 special_values(
void **state)
120 outside_limits(
void **state)
138 inside_limits(
void **state)
145 cmocka_unit_test(invalid_args),
146 cmocka_unit_test(null_score_string),
147 cmocka_unit_test(null_score),
148 cmocka_unit_test(bad_input),
149 cmocka_unit_test(special_values),
150 cmocka_unit_test(outside_limits),
151 cmocka_unit_test(inside_limits))
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
void pcmk__xml_free(xmlNode *xml)
const char * crm_xml_add(xmlNode *node, const char *name, const char *value)
Create an XML attribute with specified name and value.
void int pcmk__xe_get_score(const xmlNode *xml, const char *name, int *score, int default_score)
Pacemaker APIs related to scores.
#define PCMK_SCORE_INFINITY
Integer score to use to represent "infinity".
char * crm_strdup_printf(char const *format,...) G_GNUC_PRINTF(1