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

int main() {
        StrDict *table;
        table = NewStrDict();

        StrDictSet(table,"arbre","tree");
        StrDictSet(table,"maison","home");
        printf("%s\n", StrDictSearch(table,"arbre"));    /* prints tree */
	if (!StrDictSearch(table,"route")) printf ("[null]\n"); 
        StrDictSet(table,"chien","dog");
        printf("%s\n", StrDictSearch(table,"chien"));   /* sorts table and prints dog */

	/*       test StrDictAddNewDatumChar */
	StrDictAddNewDatumChar(table, "car. x", 'x');
        printf("%s\n", StrDictSearch(table,"car. x"));   /* sorts table and prints x */
	StrDictSetChar(table, "car. x", 'y');
        printf("%s\n", StrDictSearch(table,"car. x"));   /* sorts table and prints x */
	StrDictFree(table);
	exit (EXIT_SUCCESS);

        }
