19 invalid_params(
void **state)
21 char *buf = malloc(9);
30 outside_limits(
void **state)
32 char *buf = malloc(10);
44 inside_limits(
void **state)
46 char *buf = malloc(10);
49 assert_string_equal(buf,
"0");
52 assert_string_equal(buf,
"1024");
55 assert_string_equal(buf,
"-1024");
60 int main(
int argc,
char **argv)
62 const struct CMUnitTest tests[] = {
63 cmocka_unit_test(invalid_params),
64 cmocka_unit_test(outside_limits),
65 cmocka_unit_test(inside_limits),
68 cmocka_set_message_output(CM_OUTPUT_TAP);
69 return cmocka_run_group_tests(tests, NULL, NULL);
char * score2char_stack(int score, char *buf, size_t len)
Convert an integer score to a string, using a provided buffer.
#define CRM_SCORE_INFINITY
#define CRM_MINUS_INFINITY_S
int main(int argc, char **argv)