diff options
author | tpaviot <tpaviot@gmail.com> | 2011-11-16 15:22:27 +0100 |
---|---|---|
committer | tpaviot <tpaviot@gmail.com> | 2011-11-16 15:22:27 +0100 |
commit | a8142efd5017ad8c5da297d9958da00ad68c3a55 (patch) | |
tree | 22feccf364d122a97a6cc5e5d2ac1197fc584920 | |
parent | e64bec4540a20aa65ea401bd1cde51d7aa5deda8 (diff) | |
download | oce-a8142efd5017ad8c5da297d9958da00ad68c3a55.tar.gz oce-a8142efd5017ad8c5da297d9958da00ad68c3a55.zip |
Added IGESImport test
-rw-r--r-- | test/IGESImport_test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test/IGESImport_test/IGESImport_test.cpp | 26 | ||||
-rw-r--r-- | test/IGESImport_test/IGESImport_test_config.h.cmake | 6 |
3 files changed, 38 insertions, 0 deletions
diff --git a/test/IGESImport_test/CMakeLists.txt b/test/IGESImport_test/CMakeLists.txt new file mode 100644 index 00000000..88bb8ad5 --- /dev/null +++ b/test/IGESImport_test/CMakeLists.txt @@ -0,0 +1,6 @@ +SET(iges_file_1 ${CMAKE_SOURCE_DIR}/test/data/IGES/hammer.igs) + +CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/IGESImport_test_config.h.cmake ${CMAKE_BINARY_DIR}/test_inc/IGESImport_test_config.h ) +INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/test_inc) + +ADD_OCE_TEST(IGESImport_test "TKernel;TKIGES") diff --git a/test/IGESImport_test/IGESImport_test.cpp b/test/IGESImport_test/IGESImport_test.cpp new file mode 100644 index 00000000..4ff554b4 --- /dev/null +++ b/test/IGESImport_test/IGESImport_test.cpp @@ -0,0 +1,26 @@ +#include <TopoDS_Shape.hxx> +#include <IGESControl_Reader.hxx> + +#include <gtest/gtest.h> + +#include "IGESImport_test_config.h" + +TEST(IGESImportTestSuite, testImportIGES_1) +{ + Standard_CString aFileName = (Standard_CString) iges_file_1; + IGESControl_Reader Reader; + int status = Reader.ReadFile(aFileName); + ASSERT_EQ(status,IFSelect_RetDone); + TopoDS_Shape tdsshape; + if ( status == IFSelect_RetDone ) + { + Reader.TransferRoots(); + tdsshape = Reader.OneShape(); + } + ASSERT_FALSE(tdsshape.IsNull()); +} + +int main(int argc, char **argv){ + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/IGESImport_test/IGESImport_test_config.h.cmake b/test/IGESImport_test/IGESImport_test_config.h.cmake new file mode 100644 index 00000000..176d2d1c --- /dev/null +++ b/test/IGESImport_test/IGESImport_test_config.h.cmake @@ -0,0 +1,6 @@ +#ifndef IGESIMPORT_TEST_CONFIG_H +#define IGESIMPORT_TEST_CONFIG_H + +#cmakedefine iges_file_1 "@iges_file_1@" + +#endif
\ No newline at end of file |