66 strcat(buff,t1->
name);
71 ast_debug(1,
"Got: %s [expect %s]\n", buff, expect);
80 strcat(buff,t1->
name);
85 ast_debug(1,
"Got: %s [expect %s]\n", buff, expect);
97 strcpy(t1->
name, name);
181 ast_debug(1,
"Test AST_DLLIST_INSERT_HEAD, AST_DLLIST_TRAVERSE, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN, AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END\n");
198 ast_debug(1,
"Test AST_DLLIST_EMPTY....OK\n");
208 ast_debug(1,
"Test AST_DLLIST_INSERT_TAIL\n");
216 ast_debug(1,
"Test AST_DLLIST_FIRST....OK\n");
221 ast_debug(1,
"Test AST_DLLIST_LAST....OK\n");
226 ast_debug(1,
"Test AST_DLLIST_NEXT....OK\n");
231 ast_debug(1,
"Test AST_DLLIST_PREV....OK\n");
244 ast_debug(1,
"Test AST_DLLIST_INSERT_AFTER, AST_DLLIST_TRAVERSE_BACKWARDS\n");
251 ast_debug(1,
"Test AST_DLLIST_REMOVE_HEAD\n");
254 ast_debug(1,
"Test AST_DLLIST_REMOVE_HEAD\n");
257 ast_debug(1,
"Test AST_DLLIST_REMOVE_HEAD\n");
263 ast_debug(1,
"Test AST_DLLIST_REMOVE_HEAD....OK\n");
282 ast_debug(1,
"Test AST_DLLIST_REMOVE....OK\n");
296 ast_debug(1,
"Test AST_DLLIST_REMOVE_CURRENT... OK\n");
300 ast_debug(1,
"Test AST_DLLIST_MOVE_CURRENT, AST_DLLIST_INSERT_BEFORE_CURRENT\n");
326 ast_debug(1,
"Test: AST_DLLIST_MOVE_CURRENT_BACKWARDS and AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS\n");
#define AST_DLLIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_DLLIST_TRAVERSE_BACKWARDS(head, var, field)
Loops over (traverses) the entries in a list in reverse order, starting at the end.
static void print_list_backwards(struct test_container *x, char *expect)
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk locking-related definitions:
Asterisk main include file. File version handling, generic pbx functions.
#define AST_DLLIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
static void dll_tests(void)
static int unload_module(void)
#define AST_DLLIST_MOVE_CURRENT_BACKWARDS(newhead, field)
Move the current list entry to another list at the head.
#define AST_DLLIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
#define AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_DLLIST_INSERT_AFTER(head, listelm, elm, field)
Inserts a list entry after a given entry.
static void print_list(struct test_container *x, char *expect)
#define AST_DLLIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
Generic File Format Support. Should be included by clients of the file handling routines. File service providers should instead include mod_format.h.
static void destroy_test_container(struct test_container *x)
#define ast_debug(level,...)
Log a DEBUG message.
#define AST_DLLIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_DLLIST_NEXT(elm, field)
Returns the next entry in the list after the given entry.
A set of macros to manage doubly-linked lists.
General Asterisk PBX channel definitions.
#define AST_DLLIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_DLLIST_INSERT_BEFORE_CURRENT_BACKWARDS(elm, field)
Inserts a list entry after the current entry during a backwards traversal. Since this is a backwards ...
static struct test1 * make_test1(char *name)
Core PBX routines and definitions.
struct test_container::entries entries
#define AST_DLLIST_INSERT_BEFORE_CURRENT(elm, field)
Inserts a list node before the current node during a traversal.
static int load_module(void)
#define ast_calloc(num, len)
A wrapper for calloc()
#define AST_DLLIST_HEAD(name, type)
Defines a structure to be used to hold a list of specified type.
#define AST_DLLIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define AST_DLLIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END
Closes a safe loop traversal block.
static unsigned char * buff
#define AST_DLLIST_PREV(elm, field)
Returns the previous entry in the list before the given entry.
static struct test_container * make_cont(void)
#define AST_DLLIST_REMOVE(head, elm, field)
Removes a specific entry from a list.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
#define AST_DLLIST_FIRST(head)
Returns the first entry contained in a list.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
#define AST_DLLIST_MOVE_CURRENT(newhead, field)
Move the current list entry to another list at the tail.
#define AST_DLLIST_LAST(head)
Returns the last entry contained in a list.
#define AST_DLLIST_ENTRY(type)
Declare previous/forward links inside a list entry.