19 empty_input_string(
void **state)
24 assert_int_equal(
result, -1);
28 bad_input_string(
void **state)
33 assert_int_equal(
result, -1);
37 out_of_range(
void **state)
42 assert_int_equal(
result, -1);
44 assert_int_equal(
result, -1);
48 typical_case(
void **state)
53 assert_int_equal(
result, 0);
56 assert_int_equal(
result, 80);
59 int main(
int argc,
char **argv)
61 const struct CMUnitTest tests[] = {
62 cmocka_unit_test(empty_input_string),
63 cmocka_unit_test(bad_input_string),
64 cmocka_unit_test(out_of_range),
65 cmocka_unit_test(typical_case),
68 cmocka_set_message_output(CM_OUTPUT_TAP);
69 return cmocka_run_group_tests(tests, NULL, NULL);
int main(int argc, char **argv)
int pcmk__scan_port(const char *text, int *port)
pcmk__action_result_t result