Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Substitution Test. More...
#include "asterisk.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/app.h"
#include "asterisk/strings.h"
#include "asterisk/stringfields.h"
#include "asterisk/threadstorage.h"
#include "asterisk/test.h"
#include "asterisk/vector.h"
Go to the source code of this file.
Macros | |
#define | TEST(t) if (t == AST_TEST_FAIL) { res = AST_TEST_FAIL; } |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (test_substitution) | |
static int | load_module (void) |
static enum ast_test_result_state | test_2way_function (struct ast_test *test, struct ast_channel *c, const char *encode1, const char *encode2, const char *decode1, const char *decode2) |
static enum ast_test_result_state | test_chan_function (struct ast_test *test, struct ast_channel *c, const char *expression) |
static enum ast_test_result_state | test_chan_integer (struct ast_test *test, struct ast_channel *c, int *ifield, const char *expression) |
static enum ast_test_result_state | test_chan_integer_accessor (struct ast_test *test, struct ast_channel *c, void(*setter)(struct ast_channel *, int), const char *expression) |
static enum ast_test_result_state | test_chan_string (struct ast_test *test, struct ast_channel *c, void(*setter)(struct ast_channel *, const char *), const char *(*getter)(const struct ast_channel *), const char *expression) |
static enum ast_test_result_state | test_chan_variable (struct ast_test *test, struct ast_channel *c, const char *varname) |
static enum ast_test_result_state | test_expected_result (struct ast_test *test, struct ast_channel *c, const char *expression, const char *result) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Substitution tests" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
Substitution Test.
Definition in file test_substitution.c.
#define TEST | ( | t | ) | if (t == AST_TEST_FAIL) { res = AST_TEST_FAIL; } |
|
static |
Definition at line 350 of file test_substitution.c.
|
static |
Definition at line 350 of file test_substitution.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 350 of file test_substitution.c.
AST_TEST_DEFINE | ( | test_substitution | ) |
Definition at line 224 of file test_substitution.c.
References ast_channel_alloc, ast_channel_caller(), ast_channel_context(), ast_channel_context_set(), ast_channel_dialed(), ast_channel_exten(), ast_channel_exten_set(), ast_channel_hangupcause_set(), ast_channel_priority_set(), ast_channel_unlock, ast_cli_completion_vector(), ast_custom_function_find(), ast_free, ast_hangup(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, AST_VECTOR_CALLBACK_VOID, AST_VECTOR_GET, AST_VECTOR_PTR_FREE, AST_VECTOR_SIZE, c, sip_to_pjsip::info(), NULL, pbx_builtin_setvar_helper(), ast_custom_function::read, ast_custom_function::read2, TEST, test_2way_function(), test_chan_function(), test_chan_integer(), test_chan_integer_accessor(), test_chan_string(), test_chan_variable(), TEST_EXECUTE, test_expected_result(), and TEST_INIT.
|
static |
Definition at line 344 of file test_substitution.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 176 of file test_substitution.c.
References ast_free, ast_str_alloca, ast_str_buffer(), ast_str_create, ast_str_set(), ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 153 of file test_substitution.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, pbx_substitute_variables_helper(), and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 48 of file test_substitution.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, pbx_substitute_variables_helper(), and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 72 of file test_substitution.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, pbx_substitute_variables_helper(), and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 96 of file test_substitution.c.
References ARRAY_LEN, ast_free, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, pbx_substitute_variables_helper(), and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 123 of file test_substitution.c.
References ARRAY_LEN, ast_free, ast_str_buffer(), ast_str_create, ast_str_set(), ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, pbx_builtin_setvar_helper(), pbx_substitute_variables_helper(), str, and var.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 202 of file test_substitution.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_substitute_variables(), AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, c, result, and str.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 338 of file test_substitution.c.
References AST_TEST_UNREGISTER.
|
static |
Definition at line 350 of file test_substitution.c.
|
static |
Definition at line 350 of file test_substitution.c.