/**** * huffman_test.c * * $Id* ******/ #include #include #include #include "utility.h" #include "heap.h" #include "huffman.h" #include "test_framework.h" int main(){ char* text_file_name = "moby_dick.txt"; int frequencies[N_ASCII]; huffnode huffnodes[N_ASCII]; char* codes[N_ASCII]; heap the_heap; huffnode root; int i; char s1[10] = "001"; char* s2; printf("-- test huffman --\n"); s2 = new_code(s1, 1); ok(0==strcmp("0011", s2), "new_code"); // Had some problems with new_code(), but // appeares that the rest is working... print_test_summary(); exit(test_status()); }