From: Arnaud Giersch Date: Mon, 28 Nov 2011 09:20:07 +0000 (+0100) Subject: Remove tests for deprecated dicts of scalars. X-Git-Tag: exp_20120216~37 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6785b0ccf56c1e02cc20b213db4708effcc96e0e Remove tests for deprecated dicts of scalars. --- diff --git a/src/xbt/dict.c b/src/xbt/dict.c index ed59711647..81fb5e6b69 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -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)