diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9713ec5..a67d43a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,9 +50,11 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/models add_executable( test_stl EXCLUDE_FROM_ALL + main_test_stl.c test_stl_io.c stl_utils.c - utils.c) + utils.c + ../src/gmio_stl/internal/stl_rw_common.c) target_link_libraries(test_stl gmio) # fake_support diff --git a/tests/main_test_stl.c b/tests/main_test_stl.c new file mode 100644 index 0000000..5caa726 --- /dev/null +++ b/tests/main_test_stl.c @@ -0,0 +1,34 @@ +/**************************************************************************** +** gmio +** Copyright Fougue (2 Mar. 2015) +** contact@fougue.pro +** +** This software is a reusable library whose purpose is to provide complete +** I/O support for various CAD file formats (eg. STL) +** +** This software is governed by the CeCILL-B license under French law and +** abiding by the rules of distribution of free software. You can use, +** modify and/ or redistribute the software under the terms of the CeCILL-B +** license as circulated by CEA, CNRS and INRIA at the following URL +** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html". +****************************************************************************/ + +#include "utest_lib.h" + +const char* test_stl_read(); +const char* test_stlb_write_header(); +const char* test_stlb_write(); +const char* test_stla_write(); + +const char* all_tests() +{ + UTEST_SUITE_START(); + + UTEST_RUN(test_stl_read); + UTEST_RUN(test_stlb_write_header); + UTEST_RUN(test_stlb_write); + UTEST_RUN(test_stla_write); + + return NULL; +} +UTEST_MAIN(all_tests) diff --git a/tests/test_stl_io.c b/tests/test_stl_io.c index 54af10b..8b09609 100644 --- a/tests/test_stl_io.c +++ b/tests/test_stl_io.c @@ -13,7 +13,8 @@ ** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html". ****************************************************************************/ -#include "utest_lib.h" +#include "utest_assert.h" + #include "stl_utils.h" #include "utils.h" @@ -23,6 +24,7 @@ #include "../src/gmio_stl/stl_io.h" #include +#include static const char* stl_grabcad_arm11_filepath = "models/solid_grabcad_arm11_link0_hb.le_stlb"; @@ -369,16 +371,3 @@ void generate_stlb_tests_models() NULL); } } - -const char* all_tests() -{ - /*generate_stlb_tests_models();*/ - UTEST_SUITE_START(); - UTEST_RUN(test_stl_read); - UTEST_RUN(test_stlb_write_header); - UTEST_RUN(test_stlb_write); - UTEST_RUN(test_stla_write); - return NULL; -} - -UTEST_MAIN(all_tests)