summary refs log tree commit diff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..d1d84bf
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include "hashtable.h"
+
+int main(int argc, char** argv) {
+	printf("Testing hashing:\n");
+
+	HashTable ht = hashtable_init();
+
+	char res = hashtable_get(ht, 'a');
+
+	printf("Result: %c\n", res);
+
+	hashtable_put(ht, 'a', 'x');
+	
+	res = hashtable_get(ht, 'a');
+
+	printf("Result: %c\n", res);
+	
+	hashtable_put(ht, 'h', '1');
+	
+	res = hashtable_get(ht, 'a');
+	
+	printf("Result: %c\n", res);
+
+	hashtable_deinit(&ht);
+
+	return 0;
+}