| 1 |
#define LIBSSH_STATIC |
| 2 |
|
| 3 |
#include "config.h" |
| 4 |
|
| 5 |
#include "torture.h" |
| 6 |
#include "sftp.c" |
| 7 |
|
| 8 |
static void torture_sftp_ext_new(void **state) { |
| 9 |
sftp_ext x; |
| 10 |
|
| 11 |
(void) state; |
| 12 |
|
| 13 |
x = sftp_ext_new(); |
| 14 |
assert_non_null(x); |
| 15 |
assert_int_equal(x->count, 0); |
| 16 |
assert_null(x->name); |
| 17 |
assert_null(x->data); |
| 18 |
|
| 19 |
sftp_ext_free(x); |
| 20 |
} |
| 21 |
|
| 22 |
int torture_run_tests(void) { |
| 23 |
int rc; |
| 24 |
struct CMUnitTest tests[] = { |
| 25 |
cmocka_unit_test(torture_sftp_ext_new), |
| 26 |
}; |
| 27 |
|
| 28 |
ssh_init(); |
| 29 |
|
| 30 |
torture_filter_tests(tests); |
| 31 |
rc = cmocka_run_group_tests(tests, NULL, NULL); |
| 32 |
ssh_finalize(); |
| 33 |
|
| 34 |
return rc; |
| 35 |
} |