45    struct node *n1 = _n1;
 
   46    struct node *n2 = _n2;
 
   50    } 
else if (n1->
val == n2->
val) {
 
 
   69        info->name = 
"heap_test_1";
 
   70        info->category = 
"/main/heap/";
 
   71        info->summary = 
"push and pop elements";
 
   72        info->description = 
"Push a few elements onto a heap and make sure that they come back off in the right order.";
 
 
  120    static const unsigned int total = 100000;
 
  123    unsigned int i = 
total;
 
  124    long last = LONG_MAX;
 
  130        info->name = 
"heap_test_2";
 
  131        info->category = 
"/main/heap/";
 
  132        info->summary = 
"load test";
 
  134                "Push one hundred thousand random elements on to a heap, " 
  135                "verify that the heap has been properly constructed, " 
  136                "and then ensure that the elements are come back off " 
  137                "in the proper order.";
 
 
  197    static const unsigned int test_size = 100000;
 
  198    unsigned int i = test_size;
 
  199    long last = LONG_MAX, cur;
 
  205        info->name = 
"heap_test_3";
 
  206        info->category = 
"/main/heap/";
 
  207        info->summary = 
"random element removal test";
 
  209            "Push a hundred thousand random elements on to a heap, " 
  210            "verify that the heap has been properly constructed, " 
  211            "randomly remove and re-add 10000 elements, and then " 
  212            "ensure that the elements come back off in the proper order.";
 
  271    if (i != test_size) {
 
 
struct sla_ringing_trunk * last
Asterisk main include file. File version handling, generic pbx functions.
#define ast_malloc(len)
A wrapper for malloc()
int ast_heap_verify(struct ast_heap *h)
Verify that a heap has been properly constructed.
struct ast_heap * ast_heap_destroy(struct ast_heap *h)
Destroy a max heap.
#define ast_heap_create(init_height, cmp_fn, index_offset)
Create a max heap.
void * ast_heap_pop(struct ast_heap *h)
Pop the max element off of the heap.
void * ast_heap_remove(struct ast_heap *h, void *elm)
Remove a specific element from a heap.
#define ast_heap_push(h, elm)
Push an element on to a heap.
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
static struct ao2_container * nodes
All the nodes that we're aware of.
#define AST_TEST_REGISTER(cb)
#define ast_test_status_update(a, b, c...)
#define AST_TEST_UNREGISTER(cb)
#define AST_TEST_DEFINE(hdr)
static int node_cmp(void *_n1, void *_n2)
static int load_module(void)
static int unload_module(void)
long int ast_random(void)