|
@@ -3,214 +3,211 @@
|
|
|
#include "core/ToString.h"
|
|
|
#include "core/Utility.h"
|
|
|
|
|
|
-static CoreHashMap createIntMap() {
|
|
|
- CoreHashMap map;
|
|
|
- coreInitHashMap(&map, sizeof(int), sizeof(int));
|
|
|
+static HashMap createIntMap() {
|
|
|
+ HashMap map;
|
|
|
+ initHashMap(&map, sizeof(int), sizeof(int));
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-static CoreHashMap getTestIntMap() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- coreHashMapPut(&map, int, 1, int, 3);
|
|
|
- coreHashMapPut(&map, int, 2, int, 4);
|
|
|
- coreHashMapPut(&map, int, 3, int, 5);
|
|
|
- coreHashMapPut(&map, int, 0, int, 20);
|
|
|
+static HashMap getTestIntMap() {
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 1, int, 3);
|
|
|
+ putTypedHashMapPair(&map, int, 2, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 3, int, 5);
|
|
|
+ putTypedHashMapPair(&map, int, 0, int, 20);
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
-static void checkIntMap(CoreHashMap* map) {
|
|
|
- int* a = coreHashMapSearch(map, int, 1, int);
|
|
|
- int* b = coreHashMapSearch(map, int, 2, int);
|
|
|
- const int* c = coreHashMapSearchC(map, int, 3, int);
|
|
|
- const int* d = coreHashMapSearchC(map, int, 0, int);
|
|
|
- if(CORE_TEST_NOT_NULL(a) && CORE_TEST_NOT_NULL(b) &&
|
|
|
- CORE_TEST_NOT_NULL(c) && CORE_TEST_NOT_NULL(d)) {
|
|
|
- CORE_TEST_INT(3, *a);
|
|
|
- CORE_TEST_INT(4, *b);
|
|
|
- CORE_TEST_INT(5, *c);
|
|
|
- CORE_TEST_INT(20, *d);
|
|
|
+static void checkIntMap(HashMap* map) {
|
|
|
+ int* a = searchTypedHashMapKey(map, int, 1, int);
|
|
|
+ int* b = searchTypedHashMapKey(map, int, 2, int);
|
|
|
+ int* c = searchTypedHashMapKey(map, int, 3, int);
|
|
|
+ int* d = searchTypedHashMapKey(map, int, 0, int);
|
|
|
+ if(TEST_NOT_NULL(a) && TEST_NOT_NULL(b) && TEST_NOT_NULL(c) &&
|
|
|
+ TEST_NOT_NULL(d)) {
|
|
|
+ TEST_INT(3, *a);
|
|
|
+ TEST_INT(4, *b);
|
|
|
+ TEST_INT(5, *c);
|
|
|
+ TEST_INT(20, *d);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void testAdd() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- coreHashMapPut(&map, int, 5, int, 4);
|
|
|
- int* value = coreHashMapSearch(&map, int, 5, int);
|
|
|
- if(CORE_TEST_NOT_NULL(value)) {
|
|
|
- CORE_TEST_INT(4, *value);
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 4);
|
|
|
+ int* value = searchTypedHashMapKey(&map, int, 5, int);
|
|
|
+ if(TEST_NOT_NULL(value)) {
|
|
|
+ TEST_INT(4, *value);
|
|
|
}
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testMultipleAdd() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, 0));
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, 1));
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, 2));
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, 3));
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, 0, int));
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, 1, int));
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, 2, int));
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, 3, int));
|
|
|
checkIntMap(&map);
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testSearch() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, int, 6, int));
|
|
|
- coreHashMapPut(&map, int, 5, int, 4);
|
|
|
- coreHashMapPut(&map, int, 10, int, 3);
|
|
|
- coreHashMapPut(&map, int, 15, int, 2);
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, int, 6, int));
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 6, int));
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 10, int, 3);
|
|
|
+ putTypedHashMapPair(&map, int, 15, int, 2);
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 6, int));
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testSearchEmpty() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, int, 6, int));
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 6, int));
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testAddReplace() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
- coreHashMapPut(&map, int, 5, int, 4);
|
|
|
- coreHashMapPut(&map, int, 5, int, 10);
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, 5));
|
|
|
- int* a = coreHashMapSearch(&map, int, 5, int);
|
|
|
- if(CORE_TEST_NOT_NULL(a)) {
|
|
|
- CORE_TEST_INT(10, *a);
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 10);
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, 5, int));
|
|
|
+ int* a = searchTypedHashMapKey(&map, int, 5, int);
|
|
|
+ if(TEST_NOT_NULL(a)) {
|
|
|
+ TEST_INT(10, *a);
|
|
|
}
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testClear() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
- coreHashMapPut(&map, int, 5, int, 4);
|
|
|
- coreHashMapPut(&map, int, 4, int, 10);
|
|
|
- coreClearHashMap(&map);
|
|
|
- CORE_TEST_FALSE(coreHashMapContains(&map, int, 5));
|
|
|
- CORE_TEST_FALSE(coreHashMapContains(&map, int, 4));
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 4, int, 10);
|
|
|
+ clearHashMap(&map);
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 5, int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 4, int));
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testClearEmpty() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- coreClearHashMap(&map);
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ clearHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testOverflow(bool light) {
|
|
|
int limit = light ? 10000 : 100000;
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
for(int i = 0; i < limit; i++) {
|
|
|
- coreHashMapPut(&map, int, i, int, i);
|
|
|
+ putTypedHashMapPair(&map, int, i, int, i);
|
|
|
}
|
|
|
for(int i = 0; i < limit; i++) {
|
|
|
- CORE_TEST_TRUE(coreHashMapContains(&map, int, i));
|
|
|
+ TEST_NOT_NULL(searchTypedHashMapKey(&map, int, i, int));
|
|
|
}
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testToString() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
char buffer[128];
|
|
|
- size_t n = coreToStringHashMap(&map, buffer, sizeof(buffer),
|
|
|
- coreToStringInt, coreToStringInt);
|
|
|
- CORE_TEST_SIZE(29, n);
|
|
|
- CORE_TEST_STRING("[2 = 4, 1 = 3, 3 = 5, 0 = 20]", buffer);
|
|
|
-
|
|
|
- coreClearHashMap(&map);
|
|
|
- coreHashMapPut(&map, int, 1, int, 3);
|
|
|
- n = coreToStringHashMap(&map, buffer, sizeof(buffer), coreToStringInt,
|
|
|
- coreToStringInt);
|
|
|
- CORE_TEST_SIZE(7, n);
|
|
|
- CORE_TEST_STRING("[1 = 3]", buffer);
|
|
|
-
|
|
|
- coreClearHashMap(&map);
|
|
|
- n = coreToStringHashMap(&map, buffer, sizeof(buffer), coreToStringInt,
|
|
|
- coreToStringInt);
|
|
|
- CORE_TEST_SIZE(2, n);
|
|
|
- CORE_TEST_STRING("[]", buffer);
|
|
|
-
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ size_t n = toString(&map, buffer, sizeof(buffer), toStringInt, toStringInt);
|
|
|
+ TEST_SIZE(29, n);
|
|
|
+ TEST_STRING("[2 = 4, 1 = 3, 3 = 5, 0 = 20]", buffer);
|
|
|
+
|
|
|
+ clearHashMap(&map);
|
|
|
+ putTypedHashMapPair(&map, int, 1, int, 3);
|
|
|
+ n = toString(&map, buffer, sizeof(buffer), toStringInt, toStringInt);
|
|
|
+ TEST_SIZE(7, n);
|
|
|
+ TEST_STRING("[1 = 3]", buffer);
|
|
|
+
|
|
|
+ clearHashMap(&map);
|
|
|
+ n = toString(&map, buffer, sizeof(buffer), toStringInt, toStringInt);
|
|
|
+ TEST_SIZE(2, n);
|
|
|
+ TEST_STRING("[]", buffer);
|
|
|
+
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testEntryForEach() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- coreHashMapPut(&map, int, 0, int, -1);
|
|
|
- coreHashMapPut(&map, int, 5, int, 4);
|
|
|
- coreHashMapPut(&map, int, 10, int, 3);
|
|
|
- coreHashMapPut(&map, int, 15, int, 2);
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 0, int, -1);
|
|
|
+ putTypedHashMapPair(&map, int, 5, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 10, int, 3);
|
|
|
+ putTypedHashMapPair(&map, int, 15, int, 2);
|
|
|
|
|
|
int counter = 0;
|
|
|
- CoreHashMapIterator i;
|
|
|
- coreInitHashMapIterator(&i, &map);
|
|
|
- while(coreHashMapHasNext(&i)) {
|
|
|
- CoreHashMapNode* n = coreHashMapNext(&i);
|
|
|
- counter += coreHashMapKey(n, int) + coreHashMapValue(n, int);
|
|
|
+ HashMapIterator i;
|
|
|
+ initHashMapIterator(&i, &map);
|
|
|
+ while(hasNextHashMapNode(&i)) {
|
|
|
+ HashMapNode* n = nextHashMapNode(&i);
|
|
|
+ counter += *(const int*)n->key + *(int*)n->value;
|
|
|
}
|
|
|
- CORE_TEST_INT(38, counter);
|
|
|
+ TEST_INT(38, counter);
|
|
|
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testInvalidPut() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
+ HashMap map = createIntMap();
|
|
|
|
|
|
char buffer[128];
|
|
|
coreToStringHashMap(&map, buffer, sizeof(buffer), coreToStringInt,
|
|
|
coreToStringInt);
|
|
|
- CORE_TEST_STRING("[]", buffer);
|
|
|
+ TEST_STRING("[]", buffer);
|
|
|
|
|
|
- coreHashMapPut(&map, int, 0, int, 3);
|
|
|
- int* v = coreHashMapSearch(&map, int, 0, int);
|
|
|
- if(CORE_TEST_NOT_NULL(v)) {
|
|
|
- CORE_TEST_INT(3, *v);
|
|
|
+ putTypedHashMapPair(&map, int, 0, int, 3);
|
|
|
+ int* v = searchTypedHashMapKey(&map, int, 0, int);
|
|
|
+ if(TEST_NOT_NULL(v)) {
|
|
|
+ TEST_INT(3, *v);
|
|
|
}
|
|
|
coreToStringHashMap(&map, buffer, sizeof(buffer), coreToStringInt,
|
|
|
coreToStringInt);
|
|
|
- CORE_TEST_STRING("[0 = 3]", buffer);
|
|
|
+ TEST_STRING("[0 = 3]", buffer);
|
|
|
|
|
|
- coreClearHashMap(&map);
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, int, 0, int));
|
|
|
+ clearHashMap(&map);
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, int, 0, int));
|
|
|
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testAddCollisions() {
|
|
|
- CoreHashMap map = getTestIntMap();
|
|
|
+ HashMap map = getTestIntMap();
|
|
|
for(int i = 0; i < 16; i++) {
|
|
|
- coreHashMapPut(&map, int, i * 64, int, i);
|
|
|
+ putTypedHashMapPair(&map, int, i * 64, int, i);
|
|
|
}
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testRemove() {
|
|
|
- CoreHashMap map = createIntMap();
|
|
|
- coreHashMapPut(&map, int, 1, int, 3);
|
|
|
- coreHashMapPut(&map, int, 2, int, 4);
|
|
|
- coreHashMapPut(&map, int, 3, int, 5);
|
|
|
-
|
|
|
- CORE_TEST_TRUE(coreHashMapRemove(&map, size_t, 2));
|
|
|
- CORE_TEST_FALSE(coreHashMapRemove(&map, size_t, 7));
|
|
|
-
|
|
|
- int* a = coreHashMapSearch(&map, int, 1, int);
|
|
|
- int* b = coreHashMapSearch(&map, int, 2, int);
|
|
|
- int* c = coreHashMapSearch(&map, int, 3, int);
|
|
|
-
|
|
|
- CORE_TEST_NULL(b);
|
|
|
- if(CORE_TEST_NOT_NULL(a) && CORE_TEST_NOT_NULL(c)) {
|
|
|
- CORE_TEST_INT(3, *a);
|
|
|
- CORE_TEST_INT(5, *c);
|
|
|
+ HashMap map = createIntMap();
|
|
|
+ putTypedHashMapPair(&map, int, 1, int, 3);
|
|
|
+ putTypedHashMapPair(&map, int, 2, int, 4);
|
|
|
+ putTypedHashMapPair(&map, int, 3, int, 5);
|
|
|
+
|
|
|
+ TEST_TRUE(removeTypedHashMapKey(&map, size_t, 2));
|
|
|
+ TEST_FALSE(removeTypedHashMapKey(&map, size_t, 7));
|
|
|
+
|
|
|
+ int* a = searchTypedHashMapKey(&map, int, 1, int);
|
|
|
+ int* b = searchTypedHashMapKey(&map, int, 2, int);
|
|
|
+ int* c = searchTypedHashMapKey(&map, int, 3, int);
|
|
|
+
|
|
|
+ TEST_NULL(b);
|
|
|
+ if(TEST_NOT_NULL(a) && TEST_NOT_NULL(c)) {
|
|
|
+ TEST_INT(3, *a);
|
|
|
+ TEST_INT(5, *c);
|
|
|
}
|
|
|
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testHash() {
|
|
|
u32 buffer[] = {0xFFAA00BB, 0x00000000, 0x00FF00FF};
|
|
|
- CORE_TEST_SIZE(0xFF550044, coreHash(buffer, sizeof(buffer)));
|
|
|
+ TEST_SIZE(0xFF550044, hashKey(buffer, sizeof(buffer)));
|
|
|
|
|
|
const char* s = "wusi";
|
|
|
- CORE_TEST_TRUE(coreHashString(&s, sizeof(&s)) != 0);
|
|
|
- CORE_TEST_SIZE(0, coreHashString(&s, 1));
|
|
|
+ TEST_TRUE(hashString(&s, sizeof(&s)) != 0);
|
|
|
+ TEST_SIZE(0, hashString(&s, 1));
|
|
|
}
|
|
|
|
|
|
typedef struct {
|
|
@@ -219,56 +216,56 @@ typedef struct {
|
|
|
} A;
|
|
|
|
|
|
static void testSearchStruct() {
|
|
|
- CoreHashMap map;
|
|
|
- coreInitHashMap(&map, sizeof(A), sizeof(int));
|
|
|
+ HashMap map;
|
|
|
+ initHashMap(&map, sizeof(A), sizeof(int));
|
|
|
A a = {1, 2};
|
|
|
A b = {1, 3};
|
|
|
A c = {0, 0};
|
|
|
- CORE_TEST_NULL(coreHashMapSearchPointer(&map, &a));
|
|
|
- CORE_TEST_NULL(coreHashMapSearchPointer(&map, &b));
|
|
|
- CORE_TEST_NULL(coreHashMapSearchPointer(&map, &c));
|
|
|
+ TEST_NULL(searchHashMapKey(&map, &a));
|
|
|
+ TEST_NULL(searchHashMapKey(&map, &b));
|
|
|
+ TEST_NULL(searchHashMapKey(&map, &c));
|
|
|
int v = 3;
|
|
|
- coreHashMapPutPointer(&map, &a, &v);
|
|
|
+ putHashMapPair(&map, &a, &v);
|
|
|
|
|
|
- int* ap = coreHashMapSearchPointer(&map, &a);
|
|
|
- if(CORE_TEST_NOT_NULL(ap)) {
|
|
|
- CORE_TEST_INT(3, *ap);
|
|
|
+ int* ap = searchHashMapKey(&map, &a);
|
|
|
+ if(TEST_NOT_NULL(ap)) {
|
|
|
+ TEST_INT(3, *ap);
|
|
|
}
|
|
|
- CORE_TEST_NULL(coreHashMapSearchPointer(&map, &b));
|
|
|
- CORE_TEST_NULL(coreHashMapSearchPointer(&map, &c));
|
|
|
+ TEST_NULL(searchHashMapKey(&map, &b));
|
|
|
+ TEST_NULL(searchHashMapKey(&map, &c));
|
|
|
|
|
|
v = 4;
|
|
|
- coreHashMapPutPointer(&map, &c, &v);
|
|
|
- int* cp = coreHashMapSearchPointer(&map, &c);
|
|
|
- if(CORE_TEST_NOT_NULL(cp)) {
|
|
|
- CORE_TEST_INT(4, *cp);
|
|
|
+ putHashMapPair(&map, &c, &v);
|
|
|
+ int* cp = searchHashMapKey(&map, &c);
|
|
|
+ if(TEST_NOT_NULL(cp)) {
|
|
|
+ TEST_INT(4, *cp);
|
|
|
}
|
|
|
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
static void testSearchSize() {
|
|
|
- CoreHashMap map;
|
|
|
- coreInitHashMap(&map, sizeof(size_t), sizeof(int));
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, size_t, 0, int));
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, size_t, 1, int));
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, size_t, 2, int));
|
|
|
- coreHashMapPut(&map, size_t, 1, int, 3);
|
|
|
-
|
|
|
- int* ap = coreHashMapSearch(&map, size_t, 1, int);
|
|
|
- if(CORE_TEST_NOT_NULL(ap)) {
|
|
|
- CORE_TEST_INT(3, *ap);
|
|
|
+ HashMap map;
|
|
|
+ initHashMap(&map, sizeof(size_t), sizeof(int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, size_t, 0, int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, size_t, 1, int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, size_t, 2, int));
|
|
|
+ putTypedHashMapPair(&map, size_t, 1, int, 3);
|
|
|
+
|
|
|
+ int* ap = searchTypedHashMapKey(&map, size_t, 1, int);
|
|
|
+ if(TEST_NOT_NULL(ap)) {
|
|
|
+ TEST_INT(3, *ap);
|
|
|
}
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, size_t, 0, int));
|
|
|
- CORE_TEST_NULL(coreHashMapSearch(&map, size_t, 2, int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, size_t, 0, int));
|
|
|
+ TEST_NULL(searchTypedHashMapKey(&map, size_t, 2, int));
|
|
|
|
|
|
- coreHashMapPut(&map, size_t, 0, int, 4);
|
|
|
- int* cp = coreHashMapSearch(&map, size_t, 0, int);
|
|
|
- if(CORE_TEST_NOT_NULL(cp)) {
|
|
|
- CORE_TEST_INT(4, *cp);
|
|
|
+ putTypedHashMapPair(&map, size_t, 0, int, 4);
|
|
|
+ int* cp = searchTypedHashMapKey(&map, size_t, 0, int);
|
|
|
+ if(TEST_NOT_NULL(cp)) {
|
|
|
+ TEST_INT(4, *cp);
|
|
|
}
|
|
|
|
|
|
- coreDestroyHashMap(&map);
|
|
|
+ destroyHashMap(&map);
|
|
|
}
|
|
|
|
|
|
void testHashMap(bool light) {
|