Add simple huffman tree test

This commit is contained in:
atxr 2024-02-19 14:57:36 +01:00
parent b4e1f7df8c
commit e18152f1d8
2 changed files with 16 additions and 0 deletions

View file

@ -1,2 +1,5 @@
add_executable(test_get_cdh ${CMAKE_CURRENT_SOURCE_DIR}/test_get_cdh.c) add_executable(test_get_cdh ${CMAKE_CURRENT_SOURCE_DIR}/test_get_cdh.c)
target_link_libraries(test_get_cdh PUBLIC libmineziper) target_link_libraries(test_get_cdh PUBLIC libmineziper)
add_executable(test_decode_huffman_tree ${CMAKE_CURRENT_SOURCE_DIR}/test_decode_huffman_tree.c)
target_link_libraries(test_decode_huffman_tree PUBLIC libmineziper)

View file

@ -0,0 +1,13 @@
#include <stdio.h>
#include <strings.h>
#include "libmineziper_huffman_tree.h"
#include "libmineziper_zip.h"
int main(int argc, char** argv)
{
tree def = build_default_tree();
print_huffman_tree(def);
return 0;
}