git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7900
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
#include "xbt.h"
#include "xbt/ex.h"
#include "xbt.h"
#include "xbt/ex.h"
-XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
static xbt_cfg_t make_set()
static xbt_cfg_t make_set()
#include "portable.h"
XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
#include "portable.h"
XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
-XBT_LOG_DEFAULT_CATEGORY(xbt_dict);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt,
+ "Dictionaries provide the same functionalities than hash tables");
static void print_str(void *str)
static void print_str(void *str)
}
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) {
}
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) {
+ uintptr_t stored_data = 0;
xbt_test_log2("Add %zu under %zu", data, key);
xbt_dicti_set(head, key, data);
xbt_test_log2("Add %zu under %zu", data, key);
xbt_dicti_set(head, key, data);
xbt_dict_dump(head, (void (*)(void *)) &printf);
fflush(stdout);
}
xbt_dict_dump(head, (void (*)(void *)) &printf);
fflush(stdout);
}
- uintptr_t stored_data = xbt_dicti_get(head, key);
+ stored_data = xbt_dicti_get(head, key);
xbt_test_assert3(stored_data==data,
"Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key);
}
xbt_test_assert3(stored_data==data,
"Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key);
}
#define NB_ELEM 5000
XBT_LOG_EXTERNAL_CATEGORY(xbt_dyn);
#define NB_ELEM 5000
XBT_LOG_EXTERNAL_CATEGORY(xbt_dyn);
-XBT_LOG_DEFAULT_CATEGORY(xbt_dyn);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dyn, xbt, "Dynamic arrays");
XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
{
XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
{
#include "xbt.h"
#include "xbt/ex.h"
#include "xbt.h"
#include "xbt/ex.h"
-XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_cfg, xbt, "configuration support");
XBT_TEST_SUITE("config", "Configuration support");
XBT_TEST_SUITE("config", "Configuration support");
#include "portable.h"
XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
#include "portable.h"
XBT_LOG_EXTERNAL_CATEGORY(xbt_dict);
-XBT_LOG_DEFAULT_CATEGORY(xbt_dict);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt,
+ "Dictionaries provide the same functionalities than hash tables");
XBT_TEST_SUITE("dict", "Dict data container");
XBT_TEST_SUITE("dict", "Dict data container");
}
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) {
}
static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) {
+ uintptr_t stored_data = 0;
xbt_test_log2("Add %zu under %zu", data, key);
xbt_dicti_set(head, key, data);
xbt_test_log2("Add %zu under %zu", data, key);
xbt_dicti_set(head, key, data);
xbt_dict_dump(head, (void (*)(void *)) &printf);
fflush(stdout);
}
xbt_dict_dump(head, (void (*)(void *)) &printf);
fflush(stdout);
}
- uintptr_t stored_data = xbt_dicti_get(head, key);
+ stored_data = xbt_dicti_get(head, key);
xbt_test_assert3(stored_data==data,
"Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key);
}
xbt_test_assert3(stored_data==data,
"Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key);
}
XBT_TEST_SUITE("dynar", "Dynar data container");
XBT_LOG_EXTERNAL_CATEGORY(xbt_dyn);
XBT_TEST_SUITE("dynar", "Dynar data container");
XBT_LOG_EXTERNAL_CATEGORY(xbt_dyn);
-XBT_LOG_DEFAULT_CATEGORY(xbt_dyn);
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dyn, xbt, "Dynamic arrays");
XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
{
XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
{