aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/torture_init.c
blob: 84305ff99ff4af77c113f3212744c3034d5e2921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define LIBSSH_STATIC

#include "torture.h"
#include "libssh/libssh.h"

static void torture_ssh_init(void **state) {
    int rc;

    (void) state;

    rc = ssh_init();
    assert_int_equal(rc, SSH_OK);
    rc = ssh_finalize();
    assert_int_equal(rc, SSH_OK);
}

int torture_run_tests(void) {
    int rc;
    struct CMUnitTest tests[] = {
        cmocka_unit_test(torture_ssh_init),
    };

    torture_filter_tests(tests);
    rc = cmocka_run_group_tests(tests, NULL, NULL);

    return 0;
}