Asterisk - The Open Source Telephony Project  GIT-master-a24979a
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.

◆ 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)

Macros used for defining and registering a test

Definition at line 126 of file test.h.

◆ AST_TEST_REGISTER

#define AST_TEST_REGISTER (   cb)

Definition at line 127 of file test.h.

◆ ast_test_status_update

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

Definition at line 129 of file test.h.

◆ ast_test_suite_event_notify

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

Macros used for the Asterisk Test Suite AMI events

Definition at line 189 of file test.h.

◆ AST_TEST_UNREGISTER

#define AST_TEST_UNREGISTER (   cb)

Definition at line 128 of file test.h.

Enumeration Type Documentation

◆ ast_test_command

Enumerator
TEST_INIT 
TEST_EXECUTE 

Definition at line 199 of file test.h.

199  {
200  TEST_INIT,
201  TEST_EXECUTE,
202 };
@ TEST_INIT
Definition: test.h:200
@ TEST_EXECUTE
Definition: test.h:201

◆ ast_test_result_state

Enumerator
AST_TEST_NOT_RUN 
AST_TEST_PASS 
AST_TEST_FAIL 

Definition at line 193 of file test.h.

193  {
197 };
@ AST_TEST_PASS
Definition: test.h:195
@ AST_TEST_FAIL
Definition: test.h:196
@ AST_TEST_NOT_RUN
Definition: test.h:194