Crossfire Server, Trunk
|
#include <stdint.h>
#include <global.h>
#include "minheap.h"
#include "compat.h"
#include "define.h"
#include <check.h>
#include <stdlib.h>
#include <string.h>
#include <toolkit_common.h>
Go to the source code of this file.
Data Structures | |
struct | Pos |
Macros | |
#define | HEAP_SIZE 50 |
Functions | |
int | int_measure (const void *ob) |
int | main (void) |
int | measure_pos_distance (const void *ob) |
static END_TEST Suite * | minheap_suite (void) |
int | qsort_comp_int (const void *a, const void *b) |
int | qsort_pos_check (const void *a, const void *b) |
static void | setup (void) |
START_TEST (test_minheap_allocate) | |
END_TEST | START_TEST (test_minheap_empty_remove) |
END_TEST | START_TEST (test_minheap_insert_remove) |
END_TEST | START_TEST (test_minheap_overfill) |
END_TEST | START_TEST (test_minheap_static_alloc) |
START_TEST (test_minheap_with_struct) | |
static void | teardown (void) |
Variables | |
static MinHeap * | test_heap |
#define HEAP_SIZE 50 |
int int_measure | ( | const void * | ob | ) |
Definition at line 32 of file check_minheap.c.
References guildjoin::ob.
Referenced by START_TEST().
int main | ( | void | ) |
Definition at line 199 of file check_minheap.c.
References minheap_suite().
int measure_pos_distance | ( | const void * | ob | ) |
Definition at line 107 of file check_minheap.c.
References FABS, MAX, MIN, guildjoin::ob, Pos::x, and Pos::y.
Referenced by qsort_pos_check(), and START_TEST().
|
static |
Definition at line 180 of file check_minheap.c.
References setup(), and teardown().
Referenced by main().
int qsort_comp_int | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 38 of file check_minheap.c.
References disinfect::a, and Ice::b.
Referenced by START_TEST().
int qsort_pos_check | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 114 of file check_minheap.c.
References disinfect::a, Ice::b, and measure_pos_distance().
Referenced by START_TEST().
|
static |
Definition at line 20 of file check_minheap.c.
References cctk_setlog().
Referenced by minheap_suite().
START_TEST | ( | test_minheap_allocate | ) |
Definition at line 43 of file check_minheap.c.
References MinHeap::capacity, int_measure(), MinHeap::len, minheap_init(), and test_heap.
END_TEST START_TEST | ( | test_minheap_empty_remove | ) |
Definition at line 62 of file check_minheap.c.
References int_measure(), MinHeap::len, minheap_init(), minheap_insert(), minheap_remove(), rotate-tower::result, and test_heap.
END_TEST START_TEST | ( | test_minheap_insert_remove | ) |
Definition at line 78 of file check_minheap.c.
References int_measure(), minheap_init(), minheap_insert(), minheap_remove(), qsort_comp_int(), rotate-tower::result, and test_heap.
END_TEST START_TEST | ( | test_minheap_overfill | ) |
Definition at line 51 of file check_minheap.c.
References int_measure(), minheap_init(), minheap_insert(), rotate-tower::result, and test_heap.
END_TEST START_TEST | ( | test_minheap_static_alloc | ) |
Definition at line 149 of file check_minheap.c.
References HEAP_SIZE, int_measure(), MinHeap::len, minheap_init_static(), minheap_insert(), minheap_remove(), qsort_comp_int(), and altar_valkyrie::res.
START_TEST | ( | test_minheap_with_struct | ) |
Definition at line 118 of file check_minheap.c.
References MinHeap::len, measure_pos_distance(), minheap_init(), minheap_insert(), minheap_remove(), qsort_pos_check(), altar_valkyrie::res, test_heap, diamondslots::x, Pos::x, diamondslots::y, and Pos::y.
|
static |
Definition at line 24 of file check_minheap.c.
References minheap_free(), and test_heap.
Referenced by minheap_suite().
|
static |
Definition at line 18 of file check_minheap.c.
Referenced by START_TEST(), and teardown().