19 bad_input(
void **state) {
29 good_input(
void **state) {
47 overflow(
void **state) {
48 assert_int_equal(
crm_get_msec(
"9223372036854775807s"), LLONG_MAX);
52 main(
int argc,
char **argv)
54 const struct CMUnitTest tests[] = {
55 cmocka_unit_test(bad_input),
56 cmocka_unit_test(good_input),
57 cmocka_unit_test(overflow),
60 cmocka_set_message_output(CM_OUTPUT_TAP);
61 return cmocka_run_group_tests(tests, NULL, NULL);
long long crm_get_msec(const char *input)
Parse a time+units string and return milliseconds equivalent.
#define PCMK__PARSE_INT_DEFAULT
int main(int argc, char **argv)