Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark integer dicts as deprecated.
[simgrid.git] / src / xbt / dict.c
index e079770024c99e3e475946ecf7e5d6ccf5bda6bb..ed597116474e1212f239acb19d5e219520500f75 100644 (file)
@@ -495,6 +495,7 @@ XBT_INLINE void xbt_dict_remove(xbt_dict_t dict, const char *key)
   xbt_dict_remove_ext(dict, key, strlen(key));
 }
 
+#ifdef XBT_USE_DEPRECATED
 /**
  * \brief Add data to the dict (arbitrary key)
  * \param dict the container
@@ -529,7 +530,7 @@ XBT_INLINE void xbt_dicti_remove(xbt_dict_t dict, uintptr_t key)
 {
   xbt_dict_remove_ext(dict, (void *)&key, sizeof key);
 }
-
+#endif
 
 /**
  * \brief Remove all data from the dict
@@ -1003,12 +1004,12 @@ static void basic_test(int homogeneous)
   traverse(head);
 }
 
-XBT_TEST_UNIT("basic (heterogeneous)", test_dict_basic_heterogeneous, "Basic usage: change, retrieve, traverse: heterogeneous dictionary")
+XBT_TEST_UNIT("basic_heterogeneous", test_dict_basic_heterogeneous, "Basic usage: change, retrieve, traverse: heterogeneous dict")
 {
   basic_test(0);
 }
 
-XBT_TEST_UNIT("basic (homogeneous)", test_dict_basic_homogeneous, "Basic usage: change, retrieve, traverse: homogeneous dictionary")
+XBT_TEST_UNIT("basic_homogeneous", test_dict_basic_homogeneous, "Basic usage: change, retrieve, traverse: homogeneous dict")
 {
   basic_test(1);
 }
@@ -1083,12 +1084,12 @@ static void remove_test(int homogeneous)
   xbt_dict_free(&head);
 }
 
-XBT_TEST_UNIT("remove (heterogeneous)", test_dict_remove_heterogeneous, "Removing some values: heterogeneous dictionary")
+XBT_TEST_UNIT("remove_heterogeneous", test_dict_remove_heterogeneous, "Removing some values: heterogeneous dict")
 {
   remove_test(0);
 }
 
-XBT_TEST_UNIT("remove (homogeneous)", test_dict_remove_homogeneous, "Removing some values: homogeneous dictionary")
+XBT_TEST_UNIT("remove_homogeneous", test_dict_remove_homogeneous, "Removing some values: homogeneous dict")
 {
   remove_test(1);
 }
@@ -1123,6 +1124,7 @@ XBT_TEST_UNIT("nulldata", test_dict_nulldata, "NULL data management")
   xbt_dict_free(&head);
 }
 
+#ifdef XBT_USE_DEPRECATED
 static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data)
 {
   uintptr_t stored_data = 0;
@@ -1138,9 +1140,11 @@ static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data)
                    "Retrieved data (%zu) is not what I just stored (%zu) under key %zu",
                    stored_data, data, key);
 }
+#endif
 
 XBT_TEST_UNIT("dicti", test_dict_scalar, "Scalar data and key management")
 {
+#if XBT_USE_DEPRECATED
   xbt_test_add("Fill in the dictionnary");
 
   head = xbt_dict_new();
@@ -1163,6 +1167,7 @@ XBT_TEST_UNIT("dicti", test_dict_scalar, "Scalar data and key management")
   debuged_addi(head, 0, 0);
 
   xbt_dict_free(&head);
+#endif
 }
 
 #define NB_ELM 20000