Asterisk - The Open Source Telephony Project GIT-master-b023714
|
Test optional API. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/optional_api.h"
#include "asterisk/test.h"
Go to the source code of this file.
Macros | |
#define | CATEGORY "/main/optional_api/" |
#define | SYMNAME "test_option" |
Enumerations | |
enum | was_called { NONE , STUB , IMPL } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (test_provide_first) | |
AST_TEST_DEFINE (test_provide_last) | |
static int | load_module (void) |
static void | test_optional (void) |
static void | test_optional_impl (void) |
static void | test_optional_stub (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "ARI testing" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
ast_optional_fn | test_optional_ref |
enum was_called | was_called_result |
Test optional API.
This tests exercise the underlying implementation functions. Actual usage won't look anything like this; it would use the wrapper macros.
Definition in file test_optional_api.c.
#define CATEGORY "/main/optional_api/" |
Definition at line 43 of file test_optional_api.c.
#define SYMNAME "test_option" |
Definition at line 73 of file test_optional_api.c.
enum was_called |
Enumerator | |
---|---|
NONE | |
STUB | |
IMPL |
Definition at line 45 of file test_optional_api.c.
|
static |
Definition at line 187 of file test_optional_api.c.
|
static |
Definition at line 187 of file test_optional_api.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 187 of file test_optional_api.c.
AST_TEST_DEFINE | ( | test_provide_first | ) |
Definition at line 75 of file test_optional_api.c.
References AST_MODULE, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, CATEGORY, done, IMPL, SYMNAME, TEST_EXECUTE, TEST_INIT, test_optional(), test_optional_impl(), test_optional_ref, test_optional_stub(), and was_called_result.
AST_TEST_DEFINE | ( | test_provide_last | ) |
Definition at line 114 of file test_optional_api.c.
References AST_MODULE, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, CATEGORY, done, IMPL, STUB, SYMNAME, TEST_EXECUTE, TEST_INIT, test_optional(), test_optional_impl(), test_optional_ref, test_optional_stub(), and was_called_result.
|
static |
Definition at line 176 of file test_optional_api.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 65 of file test_optional_api.c.
References NONE, test_optional_ref, and was_called_result.
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 60 of file test_optional_api.c.
References IMPL, and was_called_result.
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 55 of file test_optional_api.c.
References STUB, and was_called_result.
Referenced by AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 169 of file test_optional_api.c.
References AST_TEST_UNREGISTER.
|
static |
Definition at line 187 of file test_optional_api.c.
|
static |
Definition at line 187 of file test_optional_api.c.
ast_optional_fn test_optional_ref |
Definition at line 53 of file test_optional_api.c.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and test_optional().
enum was_called was_called_result |
Definition at line 51 of file test_optional_api.c.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), test_optional(), test_optional_impl(), and test_optional_stub().