Asterisk - The Open Source Telephony Project
18.5.0
|
astobj2 weakproxy test module More...
#include "asterisk.h"
#include "asterisk/utils.h"
#include "asterisk/module.h"
#include "asterisk/test.h"
#include "asterisk/astobj2.h"
Go to the source code of this file.
Data Structures | |
struct | my_weakproxy |
struct | strong_str |
struct | weakproxy_str |
Macros | |
#define | ITERATOR_CHECK_NEXT(iter, var, expected) |
#define | WEAKFIND_CHECK(c, key, var, expected) |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static struct strong_str * | alloc_str (struct ao2_container *weakcontainer, const char *value) |
AO2_STRING_FIELD_CMP_FN (weakproxy_str, value) | |
AO2_STRING_FIELD_HASH_FN (weakproxy_str, value) | |
AO2_STRING_FIELD_SORT_FN (strong_str, value) | |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (astobj2_weak1) | |
AST_TEST_DEFINE (astobj2_weak_container) | |
static int | load_module (void) |
static void | test_obj_destroy_notify (void *obj, void *data) |
static void | test_obj_destructor (void *obj) |
static int | unload_module (void) |
static void | weakproxy_destructor (void *obj) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "ASTOBJ2 Weak Reference Unit 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 |
static int | destructor_called |
static int | weakproxydestroyed |
astobj2 weakproxy test module
Definition in file test_astobj2_weaken.c.
#define ITERATOR_CHECK_NEXT | ( | iter, | |
var, | |||
expected | |||
) |
Definition at line 308 of file test_astobj2_weaken.c.
Referenced by AST_TEST_DEFINE().
Definition at line 315 of file test_astobj2_weaken.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 437 of file test_astobj2_weaken.c.
|
static |
Definition at line 437 of file test_astobj2_weaken.c.
|
static |
Definition at line 274 of file test_astobj2_weaken.c.
References ao2_cleanup, ao2_link, ao2_ref, AO2_STRING_FIELD_CMP_FN(), AO2_STRING_FIELD_HASH_FN(), AO2_STRING_FIELD_SORT_FN(), ao2_t_alloc, ao2_weakproxy_alloc, ao2_weakproxy_set_object, NULL, value, strong_str::value, and weakproxy_str::value.
Referenced by AST_TEST_DEFINE().
AO2_STRING_FIELD_CMP_FN | ( | weakproxy_str | , |
value | |||
) |
Referenced by alloc_str().
AO2_STRING_FIELD_HASH_FN | ( | weakproxy_str | , |
value | |||
) |
Referenced by alloc_str().
AO2_STRING_FIELD_SORT_FN | ( | strong_str | , |
value | |||
) |
Referenced by alloc_str().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 437 of file test_astobj2_weaken.c.
AST_TEST_DEFINE | ( | astobj2_weak1 | ) |
Definition at line 63 of file test_astobj2_weaken.c.
References ao2_cleanup, ao2_ref, ao2_t_alloc, ao2_t_cleanup, ao2_t_get_weakproxy, ao2_t_ref, ao2_t_weakproxy_alloc, ao2_t_weakproxy_get_object, ao2_t_weakproxy_ref_object, ao2_t_weakproxy_set_object, ao2_weakproxy_ref_object, ao2_weakproxy_subscribe(), ao2_weakproxy_unsubscribe(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, destructor_called, my_weakproxy::f1, sip_to_pjsip::info(), NULL, OBJ_MULTIPLE, TEST_EXECUTE, TEST_INIT, test_obj_destroy_notify(), test_obj_destructor(), weakproxy_destructor(), and weakproxydestroyed.
AST_TEST_DEFINE | ( | astobj2_weak_container | ) |
Definition at line 322 of file test_astobj2_weaken.c.
References alloc_str(), AO2_ALLOC_OPT_LOCK_MUTEX, ao2_callback, ao2_cleanup, ao2_container_alloc_hash, ao2_container_alloc_list, ao2_container_count(), ao2_container_dup_weakproxy_objs(), ao2_iterator_cleanup(), ao2_iterator_init(), ao2_replace, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, cleanup(), sip_to_pjsip::info(), ITERATOR_CHECK_NEXT, NULL, OBJ_MULTIPLE, OBJ_NODATA, OBJ_UNLINK, TEST_EXECUTE, TEST_INIT, and WEAKFIND_CHECK.
|
static |
Definition at line 429 of file test_astobj2_weaken.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 51 of file test_astobj2_weaken.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 41 of file test_astobj2_weaken.c.
References destructor_called.
Referenced by AST_TEST_DEFINE().
|
static |
|
static |
Definition at line 46 of file test_astobj2_weaken.c.
References weakproxydestroyed.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 437 of file test_astobj2_weaken.c.
|
static |
Definition at line 437 of file test_astobj2_weaken.c.
|
static |
Definition at line 38 of file test_astobj2_weaken.c.
Referenced by AST_TEST_DEFINE(), and test_obj_destructor().
|
static |
Definition at line 39 of file test_astobj2_weaken.c.
Referenced by AST_TEST_DEFINE(), and weakproxy_destructor().