45 int test_option = 999;
46 char test_option2[128] = { 0 };
54 info->name =
"sample_test";
55 info->category =
"/main/sample/";
56 info->summary =
"sample unit test";
58 "This demonstrates what is required to implement "
59 "a unit test. You can pass in test-option and "
60 "test-option2 as command line arguments to this "
61 "test. test-option is an integer and test-option2 "
92 for (i = 0; i < cli_args->
argc; i++) {
95 sscanf(cli_args->
argv[i],
"test-option=%d", &test_option);
98 sscanf(cli_args->
argv[i],
"test-option2=%s", test_option2);
103 test_option, test_option2);
118 ast_test_validate_cleanup_custom(
test, ptr2, rc,
done,
"ptr2 is NULL\n");
Asterisk main include file. File version handling, generic pbx functions.
#define ast_malloc(len)
A wrapper for malloc()
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
static int force_inline attribute_pure ast_begins_with(const char *str, const char *prefix)
Checks whether a string begins with another.
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
AST_TEST_DEFINE(sample_test)
static int load_module(void)
static int unload_module(void)