21static int default_score = 99;
24assert_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);
38invalid_args(
void **state)
53null_score_string(
void **state)
59 default_score = -2000000;
62 default_score = 2000000;
69null_score(
void **state)
88bad_input(
void **state)
96special_values(
void **state)
120outside_limits(
void **state)
138inside_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))
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
#define PCMK__UNIT_TEST(group_setup, group_teardown,...)
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)
xmlNode * pcmk__xe_create(xmlNode *parent, const char *name)
void pcmk__xml_free(xmlNode *xml)