19 empty_input_string(
void **state)
24 assert_int_equal(
result, 1);
27 assert_int_equal(
result, 1);
31 input_below_minimum(
void **state)
36 assert_int_equal(
result, 1024);
40 input_above_maximum(
void **state)
45 assert_int_equal(
result, INT_MAX);
49 input_just_right(
void **state)
54 assert_int_equal(
result, 1024);
57 assert_int_equal(
result, 2048);
60 int main(
int argc,
char **argv)
62 const struct CMUnitTest tests[] = {
63 cmocka_unit_test(empty_input_string),
64 cmocka_unit_test(input_below_minimum),
65 cmocka_unit_test(input_above_maximum),
66 cmocka_unit_test(input_just_right),
69 cmocka_set_message_output(CM_OUTPUT_TAP);
70 return cmocka_run_group_tests(tests, NULL, NULL);
int main(int argc, char **argv)
int pcmk__scan_min_int(const char *text, int *result, int minimum)
pcmk__action_result_t result