summaryrefslogtreecommitdiff
path: root/src/test/check_ht.c
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
committerJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
commit510b10b96b546fcc6c6b6be85050305ddd192a41 (patch)
tree997d6c3f2c0a1ad6e27127d54a94655527e57864 /src/test/check_ht.c
parent3fb5430080199a6d92a63f8259fe4a88df9b83ba (diff)
replace some hash table usage by tuples
Previously I used hash tables, which consume too much memory. Now the critical parts are replaced by a new hand-written library called "tuple.h". Now we can easily parse larger inputs. I haven't tested its limits, though.
Diffstat (limited to 'src/test/check_ht.c')
-rw-r--r--src/test/check_ht.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/check_ht.c b/src/test/check_ht.c
index 62a7bee..dd94eab 100644
--- a/src/test/check_ht.c
+++ b/src/test/check_ht.c
@@ -192,7 +192,7 @@ int main(int UNUSED argc, char ** UNUSED argv)
printf("Success!\n");
- pair4 testk4 = { .x = 0, .y = 0, .z = 0, .w = 1 };
+ pair4 testk4 = { .x = 0, .y = 0, .z = 0, .u = 1 };
if (ht_find(htp, &testk4) == NULL) {
fleprintf0("Fail to find zero pair\n");
@@ -206,7 +206,7 @@ int main(int UNUSED argc, char ** UNUSED argv)
testk4.x = 1;
testk4.y = 2;
testk4.z = -1;
- testk4.w = 2;
+ testk4.u = 2;
if (ht_find(htp, &testk4) == NULL) {
fleprintf0("Fail to find one two minus one pair\n");
@@ -220,7 +220,7 @@ int main(int UNUSED argc, char ** UNUSED argv)
testk4.x = 1;
testk4.y = 2;
testk4.z = 1;
- testk4.w = 2;
+ testk4.u = 2;
if (ht_find(htp, &testk4)) {
fleprintf0("Accidentally find one two one two pair\n");