Add simple huffman tree test
This commit is contained in:
parent
b4e1f7df8c
commit
e18152f1d8
2 changed files with 16 additions and 0 deletions
|
|
@ -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)
|
||||||
13
tests/test_decode_huffman_tree.c
Normal file
13
tests/test_decode_huffman_tree.c
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue