#include <mutest.h>
mutest_expect
void
mutest_expect (const char *description,
mutest_expect_res_t *value,
mutest_matcher_func_t first_matcher,
...);
the description of an expectation | |
the value to check | |
a function used to match the expected value against | |
a |
An expectation is satistied if value
matches the expected value
of all the matcher functions.
mutest_it
void
mutest_it (const char *description,
mutest_spec_func_t func);
the description of a test specification | |
the function that defines the specification |
Specifications group various expectations; typically, you will use
mutest_expect()
to define each
expectation that needs to be satisfied in order to pass the specification.
mutest_describe
void
mutest_describe (const char *description,
mutest_describe_func_t func);
the description of a test suite | |
the function that defines the test suite |
Test suites group various specification; typically, you will use
mutest_it()
to define each specification in
a suite.
Each test binary can contain multiple test suites.
mutest_suite_t
An opaque structure representing a test suite.
mutest_spec_t
An opaque structure representing a specification in a suite.
mutest_expect_t
An opaque structure representing an expectation in a specification.
mutest_expect_res_t
An opaque structure representing the result of an expectation.
typedef void (* mutest_describe_func_t) (mutest_suite_t *suite)
The prototype of a function to pass to mutest_describe()
.
the test suite object |
void (* mutest_spec_func_t) (mutest_spec_t *spec)
The prototype of a function to pass to mutest_it()
.
A convenience pre-processor macro that defines main entry point of the test
binary. This function will call mutest_init()
, replace _C_
with the body
of the function, and finally call mutest_report()
.