diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-18 22:25:06 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-18 22:25:06 +0200 |
commit | f95157297e1c6dc0cf1fce12d3e10bb16fbf40f8 (patch) | |
tree | d0805c50f5af648abc204306009c2e555f263521 /tests/unittests/torture_list.c | |
parent | 89993dd75713b68f4ffebf9a30d03b1991c25b15 (diff) | |
download | libssh-f95157297e1c6dc0cf1fce12d3e10bb16fbf40f8.tar.gz libssh-f95157297e1c6dc0cf1fce12d3e10bb16fbf40f8.tar.xz libssh-f95157297e1c6dc0cf1fce12d3e10bb16fbf40f8.zip |
Factorize all the main functions in unit tests
Diffstat (limited to 'tests/unittests/torture_list.c')
-rw-r--r-- | tests/unittests/torture_list.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tests/unittests/torture_list.c b/tests/unittests/torture_list.c index 8a82072a..d954100a 100644 --- a/tests/unittests/torture_list.c +++ b/tests/unittests/torture_list.c @@ -76,7 +76,7 @@ START_TEST(torture_ssh_list_prepend) } END_TEST -static Suite *torture_make_suite(void) { +Suite *torture_make_suite(void) { Suite *s = suite_create("libssh_list"); torture_create_case(s, "torture_ssh_list_new", torture_ssh_list_new); @@ -85,27 +85,3 @@ static Suite *torture_make_suite(void) { return s; } - -int main(int argc, char **argv) { - Suite *s = NULL; - SRunner *sr = NULL; - struct argument_s arguments; - int nf; - - ZERO_STRUCT(arguments); - - torture_cmdline_parse(argc, argv, &arguments); - - s = torture_make_suite(); - - sr = srunner_create(s); - if (arguments.nofork) { - srunner_set_fork_status(sr, CK_NOFORK); - } - srunner_run_all(sr, CK_VERBOSE); - nf = srunner_ntests_failed(sr); - srunner_free(sr); - - return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; -} - |