Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark multi-level dictionaries as deprecated.
[simgrid.git] / src / xbt / dict.c
index ed59711..d970479 100644 (file)
@@ -1124,52 +1124,6 @@ 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;
-  xbt_test_log("Add %zu under %zu", data, key);
-
-  xbt_dicti_set(head, key, data);
-  if (XBT_LOG_ISENABLED(xbt_dict, xbt_log_priority_debug)) {
-    xbt_dict_dump(head, (void (*)(void *)) &printf);
-    fflush(stdout);
-  }
-  stored_data = xbt_dicti_get(head, key);
-  xbt_test_assert(stored_data == 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();
-  debuged_addi(head, 12, 12);
-  debuged_addi(head, 13, 13);
-  debuged_addi(head, 14, 14);
-  debuged_addi(head, 15, 15);
-  /* Change values */
-  debuged_addi(head, 12, 15);
-  debuged_addi(head, 15, 2000);
-  debuged_addi(head, 15, 3000);
-  /* 0 as key */
-  debuged_addi(head, 0, 1000);
-  debuged_addi(head, 0, 2000);
-  debuged_addi(head, 0, 3000);
-  /* 0 as value */
-  debuged_addi(head, 12, 0);
-  debuged_addi(head, 13, 0);
-  debuged_addi(head, 12, 0);
-  debuged_addi(head, 0, 0);
-
-  xbt_dict_free(&head);
-#endif
-}
-
 #define NB_ELM 20000
 #define SIZEOFKEY 1024
 static int countelems(xbt_dict_t head)
@@ -1282,14 +1236,17 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
   xbt_dict_free(&head);
 }
 
+#ifdef XBT_USE_DEPRECATED
 static void str_free(void *s)
 {
   char *c = *(char **) s;
   free(c);
 }
+#endif
 
 XBT_TEST_UNIT("multicrash", test_dict_multicrash, "Multi-dict crash test")
 {
+#ifdef XBT_USE_DEPRECATED
 
 #undef NB_ELM
 #define NB_ELM 100              /*00 */
@@ -1354,11 +1311,10 @@ XBT_TEST_UNIT("multicrash", test_dict_multicrash, "Multi-dict crash test")
 
   xbt_dynar_free(&keys);
 
-  /*  if (verbose>0)
-     xbt_dict_dump(mdict,&xbt_dict_print); */
-
   xbt_dict_free(&mdict);
   xbt_dynar_free(&keys);
 
+#endif
 }
+
 #endif                          /* SIMGRID_TEST */