Asterisk - The Open Source Telephony Project
18.5.0
|
Linked List Tests. More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/test.h"
#include "asterisk/strings.h"
#include "asterisk/logger.h"
#include "asterisk/linkedlists.h"
#include "asterisk/dlinkedlists.h"
Go to the source code of this file.
Data Structures | |
struct | test_dbl_llist |
struct | test_llist |
struct | test_val |
Macros | |
#define | ELEM_OR_FAIL(x, y) |
#define | MATCH_OR_FAIL(list, val, retbuf) |
#define | MATCH_OR_FAIL_DBL(list, val, retbuf) |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (single_ll_tests) | |
AST_TEST_DEFINE (double_ll_tests) | |
static int | dbl_list_expect_forward (struct test_dbl_llist *test_list, const char *expect, struct ast_str **buf) |
static int | dbl_list_expect_reverse (struct test_dbl_llist *test_list, const char *expect, struct ast_str **buf) |
static int | list_expect (struct test_llist *test_list, const char *expect, struct ast_str **buf) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Test Linked Lists" , .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 struct test_val | a = { "A" } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct test_val | b = { "B" } |
static struct test_val | c = { "C" } |
static struct test_val | d = { "D" } |
Linked List Tests.
Definition in file test_linkedlists.c.
#define ELEM_OR_FAIL | ( | x, | |
y | |||
) |
Definition at line 119 of file test_linkedlists.c.
Referenced by AST_TEST_DEFINE().
#define MATCH_OR_FAIL | ( | list, | |
val, | |||
retbuf | |||
) |
Definition at line 103 of file test_linkedlists.c.
Referenced by AST_TEST_DEFINE().
#define MATCH_OR_FAIL_DBL | ( | list, | |
val, | |||
retbuf | |||
) |
Definition at line 109 of file test_linkedlists.c.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 661 of file test_linkedlists.c.
|
static |
Definition at line 661 of file test_linkedlists.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 661 of file test_linkedlists.c.
AST_TEST_DEFINE | ( | single_ll_tests | ) |
Definition at line 125 of file test_linkedlists.c.
References ast_alloca, ast_free, AST_LIST_APPEND_LIST, AST_LIST_EMPTY, AST_LIST_FIRST, AST_LIST_INSERT_AFTER, AST_LIST_INSERT_BEFORE_CURRENT, AST_LIST_INSERT_HEAD, AST_LIST_INSERT_LIST_AFTER, AST_LIST_INSERT_TAIL, AST_LIST_LAST, AST_LIST_NEXT, AST_LIST_REMOVE, AST_LIST_REMOVE_CURRENT, AST_LIST_REMOVE_HEAD, AST_LIST_TRAVERSE_SAFE_BEGIN, AST_LIST_TRAVERSE_SAFE_END, ast_str_create, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, buf, ELEM_OR_FAIL, sip_to_pjsip::info(), test_val::list, MATCH_OR_FAIL, NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | double_ll_tests | ) |
Definition at line 336 of file test_linkedlists.c.
References ast_alloca, AST_DLLIST_APPEND_DLLIST, AST_DLLIST_EMPTY, AST_DLLIST_FIRST, AST_DLLIST_INSERT_AFTER, AST_DLLIST_INSERT_AFTER_CURRENT, AST_DLLIST_INSERT_BEFORE, AST_DLLIST_INSERT_BEFORE_CURRENT, AST_DLLIST_INSERT_HEAD, AST_DLLIST_INSERT_TAIL, AST_DLLIST_LAST, AST_DLLIST_NEXT, AST_DLLIST_PREV, AST_DLLIST_REMOVE, AST_DLLIST_REMOVE_CURRENT, AST_DLLIST_REMOVE_HEAD, AST_DLLIST_REMOVE_TAIL, AST_DLLIST_REMOVE_VERIFY, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END, AST_DLLIST_TRAVERSE_SAFE_BEGIN, AST_DLLIST_TRAVERSE_SAFE_END, ast_free, ast_str_create, AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, buf, test_val::dbl_list, ELEM_OR_FAIL, sip_to_pjsip::info(), MATCH_OR_FAIL_DBL, NULL, RAII_VAR, TEST_EXECUTE, and TEST_INIT.
|
static |
Definition at line 66 of file test_linkedlists.c.
References AST_DLLIST_TRAVERSE, ast_str_append(), ast_str_buffer(), ast_str_reset(), test_val::dbl_list, and test_val::name.
|
static |
Definition at line 78 of file test_linkedlists.c.
References AST_DLLIST_TRAVERSE_BACKWARDS, ast_str_append(), ast_str_buffer(), ast_str_reset(), test_val::dbl_list, len(), test_val::name, and str.
|
static |
Definition at line 54 of file test_linkedlists.c.
References AST_LIST_TRAVERSE, ast_str_append(), ast_str_buffer(), ast_str_reset(), test_val::list, and test_val::name.
|
static |
Definition at line 654 of file test_linkedlists.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
|
static |
Definition at line 661 of file test_linkedlists.c.
|
static |
Definition at line 46 of file test_linkedlists.c.
Referenced by __ast_format_def_register(), __ast_register_translator(), __bt_split(), _stun_show_status(), add_sdp(), anaFilter(), analog_swap_subs(), ao2_container_unregister(), ao2_iterator_init(), ao2_weakproxy_unsubscribe(), ast_atomic_dec_and_test(), ast_channel_internal_oldest_linkedid(), ast_pthread_create_stack(), ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_copy(), ast_tvadd(), ast_tvsub(), bridge_show_specific_print_channel(), check_switch_expr(), cli_complete_subscription_callid(), cli_list_subscriptions_inout(), cli_show_subscription_inout(), cli_show_subscriptions_inout(), compare_categories(), compare_char(), config_parse_variables(), contact_transport_monitor_matcher(), convshort(), dahdi_cc_callback(), delete_devices(), display_results(), dll_tests(), do_alignment_detection(), do_cli_dump_endpt(), fsk_serial(), function_realtime_store(), get_also_info(), get_button_template(), get_dahdi_codec(), get_domain(), handle_cli_iax2_test_losspct(), handle_cli_malloc_trim(), handle_show_hint(), hashtab_compare_strings(), interpolate_product_single(), interval_hook_time_cmp(), keypad_cfg_read(), load_pktccops_config(), lsf2a(), lua_extension_cmp(), main(), manager_displayconnects(), manager_sip_show_peers(), manager_skinny_show_device(), manager_skinny_show_devices(), manager_skinny_show_line(), manager_skinny_show_lines(), MD5Transform(), media_cache_prnt_summary(), monitor_matcher(), my_wink(), P1(), P2(), P4(), pow_ii(), print_applicationmap(), print_featuregroup(), print_featuregroups(), process_sdp(), r_sign(), realtime_exec(), rescomp(), say_date_generic(), say_enumeration_full(), say_full(), say_number_full(), sched_time_cmp(), search_directory_sub(), send_dtmf(), show_sound_info_cb(), show_sounds_cb(), show_users_cb(), sip_show_peers(), skinny_reload(), sorcery_memory_cache_dump(), stir_shaken_cli_show(), swap_subs(), threadstorage_init(), tls_method_to_str(), and tvfix().
|
static |
Definition at line 661 of file test_linkedlists.c.
|
static |
Definition at line 47 of file test_linkedlists.c.
Referenced by __ast_format_def_register(), __ast_register_translator(), __bt_open(), __bt_split(), _ast_hashtab_insert_immediate_bucket(), _ast_hashtab_resize(), ael_yy_create_buffer(), ael_yy_scan_buffer(), ael_yy_scan_bytes(), analog_swap_subs(), ast_channel_internal_oldest_linkedid(), ast_hashtab_lookup_internal(), ast_hashtab_remove_object_via_lookup_nolock(), ast_hashtab_remove_this_object_nolock(), ast_sockaddr_cmp(), ast_sockaddr_cmp_addr(), ast_sockaddr_copy(), ast_tvadd(), ast_tvsub(), ast_yy_create_buffer(), ast_yy_scan_buffer(), ast_yy_scan_bytes(), callerid_feed(), callerid_feed_jp(), compare_categories(), compare_char(), contact_transport_monitor_matcher(), convshort(), dll_tests(), GSM_ADD(), GSM_SUB(), hashtab_compare_strings(), interpolate_product_single(), interval_hook_time_cmp(), keypad_cfg_read(), load_pktccops_config(), lsf2a(), lua_extension_cmp(), MD5Transform(), monitor_matcher(), op_cond(), P2(), P4(), packsms7(), pow_ii(), powiedz(), ptr_matcher(), rescomp(), sched_time_cmp(), sip_show_peers(), swap_subs(), tdd_feed(), unpacksms7(), and yy_get_next_buffer().
|
static |
Definition at line 48 of file test_linkedlists.c.
Referenced by __analog_handle_event(), __ast_cli_register_multiple(), __bt_curdel(), __bt_delete(), __bt_seqadv(), __has_voicemail(), _ast_hashtab_insert_immediate_bucket(), _ast_hashtab_resize(), _macro_exec(), action_getvar(), action_hangup(), action_sendtext(), action_setvar(), action_timeout(), add_sdp(), agi_handle_command(), analog_call(), analog_my_getsigstr(), analog_new_ast_channel(), ao2_iterator_init(), append_history_va(), ast_add_extension(), ast_add_extension2_lockopt(), ast_add_extension_nolock(), ast_compile_ael2(), ast_context_add_ignorepat(), ast_context_add_include(), ast_context_add_include2(), ast_context_add_switch(), ast_context_ignorepats_count(), ast_context_includes_count(), ast_context_lockmacro(), ast_context_remove_extension_callerid(), ast_context_remove_ignorepat(), ast_context_remove_include(), ast_context_remove_switch(), ast_context_switches_count(), ast_context_unlockmacro(), ast_el_read_char(), ast_escape(), ast_escape_c(), ast_get_group(), ast_get_namedgroups(), ast_hashtab_hash_string_sax(), ast_parse_digest(), ast_recvchar(), ast_smdi_interface_find(), AST_TEST_DEFINE(), ast_unescape_c(), ast_writefile(), ast_xmldoc_printable(), base_encode(), bt_psplit(), build_channels(), c_prevword(), change_monitor_action(), check_auth(), check_day(), check_dow(), check_month(), check_switch_expr(), check_via(), chunked_atoh(), cli_complete_notify(), common_exec(), compile_script(), complete_dialplan_add_extension(), complete_dialplan_add_ignorepat(), complete_dialplan_add_include(), complete_dialplan_remove_context(), complete_dialplan_remove_extension(), complete_dialplan_remove_ignorepat(), complete_dialplan_remove_include(), complete_mohclass_realtime(), complete_show_dialplan_context(), complete_sip_notify(), complete_sipch(), conf_run(), console_print(), conv66(), dahdi_call(), dahdi_chan_conf_default(), dahdi_handle_event(), dahdi_read(), destroy_cts(), dll_tests(), do_forward(), do_pause_or_unpause(), dtmf_info_incoming_request(), ebl_callback(), enum_callback(), ext_cmp1(), ext_cmp_pattern_pos(), extract_uri(), fileexists_test(), find_context_locked(), find_matching_endif(), find_matching_endwhile(), find_ringing_channel(), find_subchannel_and_lock(), func_channels_read(), generate_filenames_string(), generic_fax_exec(), get_also_info(), get_comma(), get_csv(), get_event(), getnum(), getqzname(), getzname(), handle_call_outgoing(), handle_callforward_button(), handle_clear_alarms(), handle_cli_dialplan_remove_extension(), handle_cli_dialplan_save(), handle_cli_locks_show(), handle_core_set_debug_channel(), handle_enbloc_call_message(), handle_hangup(), handle_hd_hf(), handle_invite_replaces(), handle_mgcp_audit_endpoint(), handle_offhook_message(), handle_request_bye(), handle_request_info(), handle_request_invite(), handle_request_notify(), handle_response(), handle_soft_key_event_message(), handle_softhangup(), handle_stimulus_message(), handle_transfer_button(), handle_updates(), handle_uri(), headers_to_vars(), htonll(), httpd_process_request(), iax2_request(), iax_prov_complete_template(), ices_exec(), include_alloc(), input(), ivr_dispatch(), jb_debug_output(), keypad_cfg_read(), load_dlopen(), load_dlopen_missing(), load_pktccops_config(), lua_find_extension(), main(), manager_mixmonitor(), manager_mute_mixmonitor(), manager_mutestream(), manager_show_dialplan_helper(), manager_stop_mixmonitor(), MD5Transform(), moh_rescan_files(), my_getsigstr(), ntohll(), onAlerting(), onCallEstablished(), onProgress(), ooh323_onReceivedSetup(), ooh323c_call_thread(), ooh323c_start_call_thread(), op_cond(), oss_new(), oss_request(), P3(), P4(), parse(), parse_line(), parse_ok_contact(), parse_request(), parse_uri_full(), parse_via(), parseintarg(), pbcwhere(), pbx_builtin_setvar(), pbx_extension_helper(), pbx_load_users(), pbx_thread(), phone_answer(), populate_addr(), process_dahdi(), process_sdp(), process_text_line(), read_some(), register_verify(), reply_digest(), reqprep(), request_channel(), rfcomm_append_buf(), rfcomm_read(), rfcomm_read_and_append_char(), rfcomm_read_and_expect_char(), rfcomm_read_command(), rfcomm_read_result(), rfcomm_read_until_crlf(), rfcomm_read_until_ok(), rfcomm_wait(), rotate_file(), run_agi(), safe_mkdir(), send_waveform_to_fd(), sendfax_exec(), set_message_vars_from_req(), setsubstate(), setup_dahdi_int(), shift_pop(), show_chanstats_cb(), show_debug_helper(), show_dialplan_helper(), sip_digest_parser(), sip_report_security_event(), skinny_dialer(), skinny_newcall(), smdi_read(), sms_handleincoming_proto2(), sms_messagetx(), socket_receive_file_to_buff(), softhangup_exec(), spawn_ras(), speex_get_wb_sz_at(), speex_samples(), split_ec(), srv_callback(), start_monitor_action(), stop_monitor_action(), store_tone_zone_ring_cadence(), t30_phase_e_handler(), table_config_for_table_name(), table_configs_free(), tdd_feed(), tdd_generate(), transmit_fake_auth_response(), transmit_refer(), transmit_state_notify(), try_load_key(), txt_callback(), unistim_sp(), update_connectedline(), wait_for_answer(), while(), write_history(), xmldoc_setpostbr(), and xmpp_client_receive().
|
static |
Definition at line 49 of file test_linkedlists.c.
Referenced by __ast_play_and_record(), _skinny_message_clear(), _skinny_message_set(), _skinny_show_device(), _skinny_show_devices(), _skinny_show_line(), add_sip_domain(), ast_play_and_wait(), ast_readstring_full(), auth_http_callback(), block4(), build_device(), calc_rxstamp(), change_favorite_icon(), check_sip_domain(), clear_sip_domains(), complete_skinny_devices(), complete_skinny_show_line(), config_device(), config_parse_variables(), console_dial(), datastore_destroy_cb(), delete_devices(), destroy_session_details(), dialandactivatesub(), dll_tests(), dumpsub(), find_line_by_name(), find_subchannel_by_name(), find_subline_by_name(), finish_bookmark(), g726_encode(), get_button_template(), get_folder(), get_folder_ja(), get_unaligned_uint16(), get_unaligned_uint32(), get_unaligned_uint64(), h264_encap(), handle_button_template_req_message(), handle_call_outgoing(), handle_callforward_button(), handle_capabilities_res_message(), handle_enbloc_call_message(), handle_keypad_button_message(), handle_message(), handle_mwi_state(), handle_offhook_message(), handle_onhook_message(), handle_open_receive_channel_ack_message(), handle_skinny_reset(), handle_soft_key_event_message(), handle_stimulus_message(), handle_transfer_button(), hash_test_count(), hash_test_grow(), hash_test_lookup(), hash_test_shrink(), initreqprep(), key_select_extension(), keypad_cfg_read(), lintog726_framein(), lintog726aal2_framein(), load_pktccops_config(), main(), manager_ph_control(), manager_ph_control_block(), MD5Transform(), mwi_event_cb(), parse_naptr(), push_callinfo(), put_unaligned_uint16(), put_unaligned_uint32(), put_unaligned_uint64(), rcv_mac_addr(), reload_config(), rxqcheck(), saturate(), say_and_wait(), send_callinfo(), session_details_new(), setsubstate(), sip_show_domains(), sip_show_settings(), skinny_call(), skinny_device_alloc(), skinny_dialer(), skinny_extensionstate_cb(), skinny_indicate(), skinny_new(), skinny_newcall(), skinny_register(), skinny_reload(), skinny_senddigit_end(), skinny_session_cleanup(), skinny_set_rtp_peer(), sms_exec(), sms_nextoutgoing(), sms_readfile(), start_monitor_action(), start_rtp(), tdd_decode_baudot(), transfer_call_step1(), transfer_cancel_step2(), transmit_keepaliveack(), transtime(), txqcheck(), unistim_answer(), unistim_hangup(), unistim_register(), unistim_request(), unload_module(), and update_connectedline().