#include <stdlib.h>
#include <stdio.h>
#include "hm.h"

int main() {
    struct hm_t hm;
    hm_init(&hm, 10);
    hm_print(hm);
    hm_insert(&hm, "orestis", "123");
    hm_insert(&hm, "paul", "234");
    hm_insert(&hm, "delphine", "12lsk3");
    hm_insert(&hm, "noria", "12as 3");
    hm_insert(&hm, "andres", "123am");
    /*hm_insert(&hm, "fabien", "236123");*/
    hm_insert(&hm, "tewfik", "123skjs");
    hm_insert(&hm, "florent", "12adsadcasd3");
    hm_insert(&hm, "mickael", "123aaaaaaa");
    hm_insert(&hm, "guido", "1asdljncaskjdnckajsd23");
    hm_insert(&hm, "orestis", "1298392");
    hm_print(hm);
    printf("value is: %s\n", hm_get(hm, "orestis"));
    printf("value is: %s\n", hm_get(hm, "guido"));
    printf("value is: %s\n", hm_get(hm, "noria"));
    printf("value is: %s\n", hm_get(hm, "bob"));

    hm_delete(&hm, "fabien");
    hm_delete(&hm, "paul");
    hm_delete(&hm, "florent");
    hm_delete(&hm, "orestis");
    hm_delete(&hm, "paul");
    hm_print(hm);
    hm_insert(&hm, "paul", "aksjdnckajndcaksjdc");
    hm_print(hm);

    hm_destroy(&hm);
    return EXIT_SUCCESS;
}
