19 empty_input_string(
void **state)
28 missing_separator(
void **state)
33 assert_int_equal(start, 1234);
34 assert_int_equal(end, 1234);
38 only_separator(
void **state)
48 no_range_end(
void **state)
53 assert_int_equal(start, 2000);
58 no_range_start(
void **state)
64 assert_int_equal(end, 2020);
68 range_start_and_end(
void **state)
73 assert_int_equal(start, 2000);
74 assert_int_equal(end, 2020);
94 strtoll_errors(
void **state)
102 int main(
int argc,
char **argv)
104 const struct CMUnitTest tests[] = {
105 cmocka_unit_test(empty_input_string),
106 cmocka_unit_test(missing_separator),
107 cmocka_unit_test(only_separator),
108 cmocka_unit_test(no_range_end),
109 cmocka_unit_test(no_range_start),
110 cmocka_unit_test(range_start_and_end),
111 cmocka_unit_test(strtoll_errors),
113 cmocka_unit_test(garbage),
116 cmocka_set_message_output(CM_OUTPUT_TAP);
117 return cmocka_run_group_tests(tests, NULL, NULL);
#define PCMK__PARSE_INT_DEFAULT
int main(int argc, char **argv)
int pcmk__parse_ll_range(const char *srcstring, long long *start, long long *end)