diff options
author | Andreas Schneider <asn@cynapses.org> | 2010-12-28 13:43:32 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cynapses.org> | 2010-12-28 22:14:47 +0100 |
commit | 635a263f64ea39e2fed9e95be4c3cc425aee9302 (patch) | |
tree | 6583036e372f6e20971f8a9307dac1ba5c7d6bfb /tests/torture.h | |
parent | 17f592d4dd25eae98b1a8378625adc454976fcb6 (diff) | |
download | libssh-635a263f64ea39e2fed9e95be4c3cc425aee9302.tar.gz libssh-635a263f64ea39e2fed9e95be4c3cc425aee9302.tar.xz libssh-635a263f64ea39e2fed9e95be4c3cc425aee9302.zip |
tests: Migrate the torture library to cmockery.
Diffstat (limited to 'tests/torture.h')
-rw-r--r-- | tests/torture.h | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/tests/torture.h b/tests/torture.h index 42762b9e..271fdd20 100644 --- a/tests/torture.h +++ b/tests/torture.h @@ -7,33 +7,13 @@ #include <stdio.h> #include <stdlib.h> -#include <check.h> - -/* Used by main to communicate with parse_opt. */ -struct argument_s { - char *args[2]; - int nofork; - int verbose; -}; - -void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments); - -/* create_case() with timeout of 30seconds (default) */ -void torture_create_case(Suite *s, const char *name, TFun function); - -/* create_case() with timeout of 30seconds (default) and fixture */ -void torture_create_case_fixture(Suite *s, const char *name, TFun function, - void (*setup)(void), void (*teardown)(void)); +#include <stdarg.h> +#include <stddef.h> +#include <setjmp.h> +#include <google/cmockery.h> /* - * create_case_timeout() allow to specific a specific timeout - intended for - * breaking testcases which needs longer then 30seconds (default) - */ -void torture_create_case_timeout(Suite *s, const char *name, TFun function, - int timeout); - -/* - * returns the verbosity level asked by user + * Returns the verbosity level asked by user */ int torture_libssh_verbosity(void); @@ -41,7 +21,6 @@ int torture_libssh_verbosity(void); /* * This function must be defined in every unit test file. */ -Suite *torture_make_suite(void); - +int torture_run_tests(void); #endif /* _TORTURE_H */ |