-static void count(xbt_dict_t dict, int length)
-{
- INFO("Count elements (expecting " << length << ")");
- REQUIRE(xbt_dict_length(dict) == length); // Announced length differs
-
- xbt_dict_cursor_t cursor;
- char* key;
- void* data;
- int effective = 0;
- xbt_dict_foreach (dict, cursor, key, data)
- effective++;
-
- REQUIRE(effective == length); // Effective length differs
-}
-
-static void count_check_get_key(xbt_dict_t dict, int length)
-{
- xbt_dict_cursor_t cursor;
- char* key;
- void* data;
- int effective = 0;
-
- INFO("Count elements (expecting " << length << "), and test the getkey function");
- REQUIRE(xbt_dict_length(dict) == length); // Announced length differs
-
- xbt_dict_foreach (dict, cursor, key, data) {
- effective++;
- char* key2 = xbt_dict_get_key(dict, data);
- xbt_assert(not strcmp(key, key2), "The data was registered under %s instead of %s as expected", key2, key);
- }
-
- REQUIRE(effective == length); // Effective length differs
-}
-
-static int countelems(xbt_dict_t head)