118 #ifdef TEST_FRAMEWORK 120 #define AST_TEST_DEFINE(hdr) static enum ast_test_result_state hdr(struct ast_test_info *info, enum ast_test_command cmd, struct ast_test *test) 121 #define AST_TEST_REGISTER(cb) ast_test_register(cb) 122 #define AST_TEST_UNREGISTER(cb) ast_test_unregister(cb) 126 #define AST_TEST_DEFINE(hdr) static enum ast_test_result_state attribute_unused hdr(struct ast_test_info *info, enum ast_test_command cmd, struct ast_test *test) 127 #define AST_TEST_REGISTER(cb) 128 #define AST_TEST_UNREGISTER(cb) 129 #define ast_test_status_update(a,b,c...) 130 #define ast_test_debug(test, fmt, ...) ast_cli 135 #ifdef TEST_FRAMEWORK 186 __attribute__((
format(printf, 5, 6)));
191 #define ast_test_suite_event_notify(s, f, ...) \ 192 __ast_test_suite_event_notify(__FILE__, __PRETTY_FUNCTION__, __LINE__, (s), (f), ## __VA_ARGS__) 196 #define ast_test_suite_event_notify(s, f, ...) 254 #ifdef TEST_FRAMEWORK 377 __attribute__((
format(printf, 5, 6)));
382 #define ast_test_status_update(t, f, ...) __ast_test_status_update(__FILE__, __PRETTY_FUNCTION__, __LINE__, (t), (f), ## __VA_ARGS__) 401 #define ast_test_validate(test, condition, ...) \ 403 if (!(condition)) { \ 404 __ast_test_status_update(__FILE__, __PRETTY_FUNCTION__, __LINE__, (test), "%s: %s\n", strlen(#__VA_ARGS__) ? #__VA_ARGS__ : "Condition failed", #condition); \ 405 return AST_TEST_FAIL; \ 424 #define ast_test_validate_cleanup(test, condition, rc_variable, cleanup_label) ({ \ 425 if (!(condition)) { \ 426 ast_test_status_update((test), "%s: %s\n", "Condition failed", #condition); \ 427 rc_variable = AST_TEST_FAIL; \ 428 goto cleanup_label; \ Contains all the initialization information required to store a new test definition.
const char * summary
Short summary of test.
void __ast_test_suite_event_notify(const char *file, const char *func, int line, const char *state, const char *fmt,...)
String manipulation functions.
int ast_test_unregister(ast_test_cb_t *cb)
int ast_test_register_init(const char *category, ast_test_init_cb_t *cb)
int ast_test_register(ast_test_cb_t *cb)
struct ast_json * ast_test_suite_get_blob(struct ast_test_suite_message_payload *payload)
int __ast_test_status_update(const char *file, const char *func, int line, struct ast_test *test, const char *fmt,...)
const char * description
More detailed description of test.
const char * name
name of test, unique to category
int ast_test_register_cleanup(const char *category, ast_test_cleanup_cb_t *cb)
struct stasis_topic * ast_test_suite_topic(void)
const char * category
test category
void ast_test_set_result(struct ast_test *test, enum ast_test_result_state state)
unsigned int explicit_only
Only run if explicitly named.
A wrapper object that can be ao2 ref counted around an ast_json blob.
#define ast_test_debug(test, fmt,...)
Standard Command Line Interface.
Abstract JSON element (object, array, string, int, ...).
static snd_pcm_format_t format
static struct ast_test * test