Asterisk - The Open Source Telephony Project  GIT-master-b91fb3c
Data Structures | Macros | Enumerations
test.h File Reference

Test Framework API. More...

Go to the source code of this file.

Data Structures

struct  ast_test_info
 Contains all the initialization information required to store a new test definition. More...
 

Macros

#define ast_test_debug(test, fmt, ...)   ast_cli /* Dummy function that should not be called. */
 
#define AST_TEST_DEFINE(hdr)   static enum ast_test_result_state attribute_unused hdr(struct ast_test_info *info, enum ast_test_command cmd, struct ast_test *test)
 
#define AST_TEST_REGISTER(cb)
 
#define ast_test_status_update(a, b, c...)
 
#define ast_test_suite_event_notify(s, f, ...)
 
#define AST_TEST_UNREGISTER(cb)
 

Enumerations

enum  ast_test_command { TEST_INIT, TEST_EXECUTE }
 
enum  ast_test_result_state { AST_TEST_NOT_RUN, AST_TEST_PASS, AST_TEST_FAIL }
 

Detailed Description

Test Framework API.

For an overview on how to use the test API, see Asterisk Unit Test API

Author
David Vossel dvoss.nosp@m.el@d.nosp@m.igium.nosp@m..com
Russell Bryant russe.nosp@m.ll@d.nosp@m.igium.nosp@m..com

Definition in file test.h.

Macro Definition Documentation

◆ ast_test_debug

#define ast_test_debug (   test,
  fmt,
  ... 
)    ast_cli /* Dummy function that should not be called. */

Definition at line 130 of file test.h.

Referenced by astobj2_test_1_helper(), test_traversal_sorted(), and verify_mock_cdr_record().

◆ AST_TEST_DEFINE

#define AST_TEST_DEFINE (   hdr)    static enum ast_test_result_state attribute_unused hdr(struct ast_test_info *info, enum ast_test_command cmd, struct ast_test *test)

◆ AST_TEST_REGISTER

#define AST_TEST_REGISTER (   cb)

◆ ast_test_status_update

#define ast_test_status_update (   a,
  b,
  c... 
)

Definition at line 129 of file test.h.

Referenced by add_notify(), append_mailbox(), apply_list_configuration(), ast_dsp_get_threshold_from_settings(), ast_sip_threadpool(), ast_sockaddr_from_pj_sockaddr(), AST_TEST_DEFINE(), astobj2_test_1_helper(), build_conf(), build_ha(), check_event(), check_events(), check_stats(), check_stream_positions(), dump_consumer(), dump_event(), events_are_equal(), get_calleridname(), get_in_brackets(), get_name_and_number(), handler_wait_for_message(), insert_test_duplicates(), insert_test_vector(), invalid_record_test(), is_timed_out(), json_test_cleanup(), kqueue_timer_fd(), listener_check(), nominal_test(), off_nominal_test(), parse_contact_header(), parse_name_andor_addr(), parse_sip_options(), parse_uri(), parse_uri_full(), parse_via(), query_set_test(), read_test(), sched_order_check(), scheduler(), send_msg(), sip_acf_channel_read(), sip_parse_host(), sip_parse_nat_option(), sip_parse_register_line(), sip_unregister_tests(), sorcery_memory_cache_ami_populate(), test_2way_function(), test_ao2_callback_traversal(), test_ao2_find_w_no_flags(), test_ao2_find_w_OBJ_KEY(), test_ao2_find_w_OBJ_PARTIAL_KEY(), test_ao2_find_w_OBJ_POINTER(), test_ao2_iteration(), test_chan_function(), test_chan_integer(), test_chan_integer_accessor(), test_chan_string(), test_chan_variable(), test_container_clone(), test_create_joint(), test_expected_duplicates(), test_expected_result(), test_exten(), test_files_create(), test_files_destroy(), test_jb_late_frame_insertion(), test_jb_lost_frame_insertion(), test_jb_nominal_frame_insertion(), test_jb_out_of_order_frame_insertion(), test_lock(), test_performance(), test_record(), test_ref(), test_results(), test_traversal_nonsorted(), test_traversal_sorted(), test_unlock(), test_unref(), test_xml(), testloop(), unbound_config_preapply_callback(), user_event_wait_for_events(), verify_bad_headers(), verify_mock_cdr_record(), vmsayname_exec(), wait_for_channel_callback(), wait_for_completion(), wait_for_device_state_updates(), wait_for_empty_notice(), wait_for_hook(), wait_for_resolution(), wait_until_thread_state(), and wait_until_thread_state_task_pushed().

◆ ast_test_suite_event_notify

#define ast_test_suite_event_notify (   s,
  f,
  ... 
)

Macros used for the Asterisk Test Suite AMI events

Examples:
/tmp/asterisk-shallow/main/app.c.

Definition at line 196 of file test.h.

Referenced by advanced_options(), ast_bridge_channel_feature_digit(), ast_channel_callid_set(), ast_check_hangup(), ast_load_resource(), ast_rtp_read(), ast_sip_subscription_notify(), ast_streamfile(), ast_unload_resource(), ast_waitfor_nandfds(), bridge_features_duration_callback(), bridge_handle_dtmf(), chan_pjsip_indicate(), change_password_realtime(), conf_change_state(), conf_exec(), conf_play(), conf_run(), conf_start_record(), conf_stop_record(), conf_update_user_mute(), control_streamfile(), dialout(), execute_menu_entry(), forward_message(), generic_lock_unlock_helper(), generic_mute_unmute_user(), get_folder(), get_folder2(), grab_transfer(), indicate_data_internal(), initial_notify_task(), messaging_app_subscribe_endpoint(), messaging_app_unsubscribe_endpoint(), mixmonitor_thread(), play_message(), pubsub_on_refresh_timeout(), pubsub_on_rx_mwi_notify_request(), register_aor_core(), registrar_contact_delete(), rtp_allocate_transport(), say_number_full(), serialized_send_notify(), session_destructor(), session_inv_on_tsx_state_changed(), sip_options_contact_status_notify_task(), sip_options_set_contact_status(), sip_subscription_send_request(), stale_item_update(), state_notify_build_xml(), testsuite_notify_feature_success(), vm_change_password(), vm_change_password_shell(), vm_execmain(), vm_forwardoptions(), vm_newuser_setup(), vm_options(), vm_tempgreeting(), wait_file(), waitstream_control(), and waitstream_core().

◆ AST_TEST_UNREGISTER

#define AST_TEST_UNREGISTER (   cb)

Enumeration Type Documentation

◆ ast_test_command

Enumerator
TEST_INIT 
TEST_EXECUTE 

Definition at line 206 of file test.h.

206  {
207  TEST_INIT,
208  TEST_EXECUTE,
209 };

◆ ast_test_result_state

Enumerator
AST_TEST_NOT_RUN 
AST_TEST_PASS 
AST_TEST_FAIL 

Definition at line 200 of file test.h.

200  {
204 };