Lumiera  0.pre.03
»edit your freedom«
test-psplay.c File Reference

Go to the source code of this file.

Description

C unit test to cover a probabilistic splay tree library implementation.

These tree data structures are used as key-value store in several of the management facilities of the vault

See also
psplay.h

Definition in file test-psplay.c.

#include <time.h>
#include <stdlib.h>
#include <nobug.h>
#include "lib/psplay.h"
#include "lib/test/test.h"

Classes

struct  TestItem
 

Functions

static int cmp_fn (const void *, const void *)
 
static void delete_fn (PSplaynode)
 
static int fcmp_fn (const void *, const void *)
 
static void fdelete_fn (PSplaynode)
 
static const void * fkey_fn (const PSplaynode)
 
static const void * key_fn (const PSplaynode)
 
TESTS_BEGIN TEST ("basic")
 
 TEST ("basic_insert_dump")
 
 TEST ("insert_find")
 
 TEST ("basic_insert_splay")
 
 TEST ("basic_rand_insert_dump")
 
 TEST ("fast_insert")
 
 TEST ("nonexistant")
 
 TEST ("insert")
 
 TEST ("insert_rand")
 
 TEST ("insert_fastcheck")
 
void testitem_delete (TestItem self)
 
void testitem_dump (PSplay self, FILE *dest)
 
void testitem_graphvizdump (PSplay self, FILE *dest)
 
psplay_delete_fn testitem_graphvizprint_node (PSplaynode node, const enum psplay_order_enum which, int level, void *data)
 
TestItem testitem_new (const char *str)
 
psplay_delete_fn testitem_print_node (PSplaynode node, const enum psplay_order_enum which, int level, void *data)
 

Class Documentation

◆ testitem

struct testitem
Class Members
psplaynode node
char * key
+ Collaboration diagram for TestItem: