SimGrid  3.16
Versatile Simulation of Distributed Systems
dict_unit.cpp File Reference
#include <stdio.h>
#include "xbt.h"
#include <time.h>
#include "xbt/ex.h"
#include <xbt/ex.hpp>
#include "src/internal_config.h"

Macros

#define NB_ELM   20000
 
#define SIZEOFKEY   1024
 

Functions

 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY (xbt_dict)
 
static void debugged_add_ext (xbt_dict_t head, const char *key, const char *data_to_fill)
 
static void debugged_add (xbt_dict_t head, const char *key)
 
static xbt_dict_t new_fixture ()
 
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 debugged_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)
 
 XBT_TEST_UNIT ("basic", test_dict_basic, "Basic usage: change, retrieve and traverse homogeneous dicts")
 
 XBT_TEST_UNIT ("remove_homogeneous", test_dict_remove, "Removing some values from homogeneous dicts")
 
 XBT_TEST_UNIT ("nulldata", test_dict_nulldata, "nullptr 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")
 

Macro Definition Documentation

◆ NB_ELM

#define NB_ELM   20000

◆ SIZEOFKEY

#define SIZEOFKEY   1024

Function Documentation

◆ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY()

XBT_LOG_EXTERNAL_DEFAULT_CATEGORY ( xbt_dict  )

◆ debugged_add_ext()

static void debugged_add_ext ( xbt_dict_t  head,
const char *  key,
const char *  data_to_fill 
)
static

◆ debugged_add()

static void debugged_add ( xbt_dict_t  head,
const char *  key 
)
static

◆ new_fixture()

static xbt_dict_t new_fixture ( )
static

◆ search_ext()

static void search_ext ( xbt_dict_t  head,
const char *  key,
const char *  data 
)
static

◆ search()

static void search ( xbt_dict_t  head,
const char *  key 
)
static

◆ debugged_remove()

static void debugged_remove ( xbt_dict_t  head,
const char *  key 
)
static

◆ traverse()

static void traverse ( xbt_dict_t  head)
static

◆ search_not_found()

static void search_not_found ( xbt_dict_t  head,
const char *  data 
)
static

◆ count()

static void count ( xbt_dict_t  dict,
int  length 
)
static

◆ count_check_get_key()

static void count_check_get_key ( xbt_dict_t  dict,
int  length 
)
static

◆ XBT_TEST_UNIT() [1/5]

XBT_TEST_UNIT ( "basic"  ,
test_dict_basic  ,
"Basic usage:  change,
retrieve and traverse homogeneous dicts"   
)

◆ XBT_TEST_UNIT() [2/5]

XBT_TEST_UNIT ( "remove_homogeneous"  ,
test_dict_remove  ,
"Removing some values from homogeneous dicts"   
)

◆ XBT_TEST_UNIT() [3/5]

XBT_TEST_UNIT ( "nulldata"  ,
test_dict_nulldata  ,
"nullptr data management"   
)

◆ countelems()

static int countelems ( xbt_dict_t  head)
static

◆ XBT_TEST_UNIT() [4/5]

XBT_TEST_UNIT ( "crash"  ,
test_dict_crash  ,
"Crash test"   
)

◆ XBT_TEST_UNIT() [5/5]

XBT_TEST_UNIT ( "ext"  ,
test_dict_int  ,
"Test dictionnary with int keys  
)