SimGrid  3.13
Versatile Simulation of Distributed Systems
dict_unit.c File Reference
#include <stdio.h>
#include "xbt.h"
#include "xbt/ex.h"
#include "src/internal_config.h"

Macros

#define NB_ELM   20000
 
#define SIZEOFKEY   1024
 

Functions

 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (xbt_dict)
 
static void debuged_add_ext (xbt_dict_t head, const char *key, const char *data_to_fill, void_f_pvoid_t free_f)
 
static void debuged_add (xbt_dict_t head, const char *key, void_f_pvoid_t free_f)
 
static void fill (xbt_dict_t *head, int homogeneous)
 
static void search_ext (xbt_dict_t head, const char *key, const char *data)
 
static void search (xbt_dict_t head, const char *key)
 
static void debuged_remove (xbt_dict_t head, const char *key)
 
static void traverse (xbt_dict_t head)
 
static void search_not_found (xbt_dict_t head, const char *data)
 
static void count (xbt_dict_t dict, int length)
 
static void count_check_get_key (xbt_dict_t dict, int length)
 
static void basic_test (int homogeneous)
 
 XBT_TEST_UNIT ("basic_heterogeneous", test_dict_basic_heterogeneous,"Basic usage: change, retrieve, traverse: heterogeneous dict")
 
 XBT_TEST_UNIT ("basic_homogeneous", test_dict_basic_homogeneous,"Basic usage: change, retrieve, traverse: homogeneous dict")
 
static void remove_test (int homogeneous)
 
 XBT_TEST_UNIT ("remove_heterogeneous", test_dict_remove_heterogeneous,"Removing some values: heterogeneous dict")
 
 XBT_TEST_UNIT ("remove_homogeneous", test_dict_remove_homogeneous,"Removing some values: homogeneous dict")
 
 XBT_TEST_UNIT ("nulldata", test_dict_nulldata,"NULL data management")
 
static int countelems (xbt_dict_t head)
 
 XBT_TEST_UNIT ("crash", test_dict_crash,"Crash test")
 
 XBT_TEST_UNIT ("ext", test_dict_int,"Test dictionnary with int keys")
 

Variables

xbt_ex_t e
 
xbt_dict_t head = NULL
 
char * data
 

Macro Definition Documentation

#define NB_ELM   20000
#define SIZEOFKEY   1024

Function Documentation

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( xbt_dict  )
static void debuged_add_ext ( xbt_dict_t  head,
const char *  key,
const char *  data_to_fill,
void_f_pvoid_t  free_f 
)
static
static void debuged_add ( xbt_dict_t  head,
const char *  key,
void_f_pvoid_t  free_f 
)
static
static void fill ( xbt_dict_t head,
int  homogeneous 
)
static
static void search_ext ( xbt_dict_t  head,
const char *  key,
const char *  data 
)
static
static void search ( xbt_dict_t  head,
const char *  key 
)
static
static void debuged_remove ( xbt_dict_t  head,
const char *  key 
)
static
static void traverse ( xbt_dict_t  head)
static
static void search_not_found ( xbt_dict_t  head,
const char *  data 
)
static
static void count ( xbt_dict_t  dict,
int  length 
)
static
static void count_check_get_key ( xbt_dict_t  dict,
int  length 
)
static
static void basic_test ( int  homogeneous)
static
XBT_TEST_UNIT ( "basic_heterogeneous"  ,
test_dict_basic_heterogeneous  ,
"Basic usage:  change,
retrieve  ,
traverse:heterogeneous dict"   
)
XBT_TEST_UNIT ( "basic_homogeneous"  ,
test_dict_basic_homogeneous  ,
"Basic usage:  change,
retrieve  ,
traverse:homogeneous dict"   
)
static void remove_test ( int  homogeneous)
static
XBT_TEST_UNIT ( "remove_heterogeneous"  ,
test_dict_remove_heterogeneous  ,
"Removing some values: heterogeneous dict"   
)
XBT_TEST_UNIT ( "remove_homogeneous"  ,
test_dict_remove_homogeneous  ,
"Removing some values: homogeneous dict"   
)
XBT_TEST_UNIT ( "nulldata"  ,
test_dict_nulldata  ,
"NULL data management"   
)
static int countelems ( xbt_dict_t  head)
static
XBT_TEST_UNIT ( "crash"  ,
test_dict_crash  ,
"Crash test  
)
XBT_TEST_UNIT ( "ext"  ,
test_dict_int  ,
"Test dictionnary with int keys  
)

Variable Documentation

xbt_dict_t head = NULL
char* data