OpenVPN
vendor
cmocka
example
simple_test.c
Go to the documentation of this file.
1
#include <stdarg.h>
2
#include <stddef.h>
3
#include <setjmp.h>
4
#include <
cmocka.h
>
5
6
/* A test case that does nothing and succeeds. */
7
static
void
null_test_success
(
void
**state) {
8
(void) state;
/* unused */
9
}
10
11
int
main
(
void
) {
12
const
struct
CMUnitTest
tests[] = {
13
cmocka_unit_test
(
null_test_success
),
14
};
15
16
return
cmocka_run_group_tests
(tests, NULL, NULL);
17
}
cmocka_unit_test
#define cmocka_unit_test(f)
Initializes a CMUnitTest structure.
Definition:
cmocka.h:1653
main
int main(void)
Definition:
simple_test.c:11
cmocka_run_group_tests
#define cmocka_run_group_tests(group_tests, group_setup, group_teardown)
Definition:
cmocka.h:1749
null_test_success
static void null_test_success(void **state)
Definition:
simple_test.c:7
cmocka.h
CMUnitTest
Definition:
cmocka.h:2071
Generated by
1.8.13