VSF Documented
|
#include "./vsf_test.h"
Functions | |
void | vsf_test_init (vsf_test_t *test, vsf_test_case_t *test_case_array, uint32_t test_case_size) |
initialize vsf test | |
bool | vsf_test_add_ex (vsf_test_t *test, vsf_test_case_t *test_case) |
Add to add a test case of any type. | |
bool | vsf_test_add (vsf_test_t *test, vsf_test_jmp_fn_t *jmp_fn, char *cfg_str) |
Add to add a test case of VSF_TEST_TYPE_LONGJMP_FN type. | |
bool | vsf_test_add_bool_fn (vsf_test_t *test, vsf_test_bool_fn_t *b_fn, char *cfg_str) |
Add to add a test case of VSF_TEST_TYPE_BOOL_FN type. | |
void | __vsf_test_longjmp (vsf_test_t *test, vsf_test_result_t result, const char *file_name, uint32_t line, const char *function_name, const char *condition) |
rong jump. the user does not need to directly call this API | |
void | vsf_test_reboot (vsf_test_t *test, vsf_test_result_t result, const char *file_name, uint32_t line, const char *function_name, const char *condition) |
reboot, usually called inside an exception. | |
void | vsf_test_run_tests (vsf_test_t *test) |
Run all tests. Should be called after all use cases have been initialized. | |
void vsf_test_init | ( | vsf_test_t * | test, |
vsf_test_case_t * | tc_array, | ||
uint32_t | array_size | ||
) |
initialize vsf test
[in] | test | a pointer to structure vsf_test_t |
[in] | tc_array | a pointer to array vsf_test_case_t |
[in] | array_size | size of tc_array |
bool vsf_test_add_ex | ( | vsf_test_t * | test, |
vsf_test_case_t * | test_case | ||
) |
Add to add a test case of any type.
[in] | test | a pointer to structure vsf_test_t |
[in] | test_case | a pointer to array vsf_test_case_t |
bool vsf_test_add | ( | vsf_test_t * | test, |
vsf_test_jmp_fn_t * | jmp_fn, | ||
char * | cfg | ||
) |
Add to add a test case of VSF_TEST_TYPE_LONGJMP_FN type.
[in] | test | a pointer to structure vsf_test_t |
[in] | jmp_fn | a pointer to function vsf_test_jmp_fn_t |
[in] | cfg | a string of request information for the test case |
bool vsf_test_add_bool_fn | ( | vsf_test_t * | test, |
vsf_test_bool_fn_t * | b_fn, | ||
char * | cfg | ||
) |
Add to add a test case of VSF_TEST_TYPE_BOOL_FN type.
[in] | test | a pointer to structure vsf_test_t |
[in] | b_fn | a pointer to function vsf_test_bool_fn_t |
[in] | cfg | a string of request information for the test case |
void __vsf_test_longjmp | ( | vsf_test_t * | test, |
vsf_test_result_t | result, | ||
const char * | file_name, | ||
uint32_t | line, | ||
const char * | function_name, | ||
const char * | condition | ||
) |
rong jump. the user does not need to directly call this API
[in] | test | a pointer to structure vsf_test_t |
[in] | result | test result, vsf_test_result_t |
[in] | file_name | then name of the file where the assertion occurred |
[in] | line | the line number of the code where the assertion occurred |
[in] | function_name | the name of the function where the assertion occurred |
[in] | condition | String of asserted code |
void vsf_test_reboot | ( | vsf_test_t * | test, |
vsf_test_result_t | result, | ||
const char * | file_name, | ||
uint32_t | line, | ||
const char * | function_name, | ||
const char * | additional_str | ||
) |
reboot, usually called inside an exception.
[in] | test | a pointer to structure vsf_test_t |
[in] | result | test result, vsf_test_result_t |
[in] | file_name | then name of the file where the assertion occurred |
[in] | line | the line number of the code where the assertion occurred |
[in] | function_name | the name of the function where the assertion occurred |
[in] | additional_str | provide additional exception information |
void vsf_test_run_tests | ( | vsf_test_t * | test | ) |
Run all tests. Should be called after all use cases have been initialized.
[in] | test | a pointer to structure vsf_test_t |