diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
commit | 1e64dddf1ea30282c89de7f35854a68614234652 (patch) | |
tree | 165d37c1c66f6ff79d48c74794238b3f0bed09da /tests | |
parent | 5c779159c208ca3d88c88479ab29f9cd66574859 (diff) | |
parent | d0856efe6da545693f9c50a8a2514a9f999ab5ef (diff) |
Merge branch 'master' of github.com:openscad/openscad into issue159
Diffstat (limited to 'tests')
30 files changed, 155 insertions, 49 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5ec8be7..87e5319 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -6,6 +6,25 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSIO # http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0017 cmake_policy(SET CMP0017 NEW) endif() + +# Detect Lion and force gcc +IF (APPLE) + EXECUTE_PROCESS(COMMAND sw_vers -productVersion OUTPUT_VARIABLE MACOSX_VERSION) + IF (NOT ${MACOSX_VERSION} VERSION_LESS "10.7.0") + message("Detected Lion or later") + set(CMAKE_C_COMPILER "gcc") + set(CMAKE_CXX_COMPILER "g++") + ELSE() + message("Detected Snow Leopard or older") + if (USE_LLVM) + message("Using LLVM compiler") + set(CMAKE_C_COMPILER "llvm-gcc") + set(CMAKE_CXX_COMPILER "llvm-g++") + endif() + ENDIF() +ENDIF(APPLE) + + project(tests) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") @@ -67,6 +86,17 @@ if(WIN32 AND CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -frounding-math") endif() +# Clang compiler + +if(CMAKE_CXX_COMPILER MATCHES ".*clang.*") + # disable enormous amount of warnings about CGAL + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-extensions") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") +endif() + # # Build test apps # @@ -157,7 +187,8 @@ endif() set(CMAKE_INCLUDE_DIRECTORIES_BEFORE OFF) -# Eigen2 + +# Eigen # Turn off Eigen SIMD optimization if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -166,34 +197,63 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif() endif() -if (NOT $ENV{EIGEN2DIR} STREQUAL "") - set(EIGEN2_DIR "$ENV{EIGEN2DIR}") -elseif (NOT $ENV{OPENSCAD_LIBRARIES} STREQUAL "") - set(EIGEN2_DIR "$ENV{OPENSCAD_LIBRARIES}") +# Priority +# 3. EIGENDIR if set (EIGEN2DIR for backwards compatability) +# 1. OPENSCAD_LIBRARIES eigen3 +# 2. OPENSCAD_LIBRARIES eigen2 +# 4. system's standard include paths for eigen3 +# 5. system's standard include paths for eigen2 + +set(EIGEN2_DIR "$ENV{EIGEN2DIR}") +set(EIGEN_DIR "$ENV{EIGENDIR}") +set(OPENSCAD_LIBDIR "$ENV{OPENSCAD_LIBRARIES}") + +if (EIGEN_DIR) + set(EIGHINT ${EIGEN_DIR}/include/eigen3 ${EIGEN_DIR}/include/eigen2 ${EIGEN_DIR}) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS ${EIGHINT}) +endif() +if (EIGEN2_DIR) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS ${EIGEN2_DIR}/include/eigen2 ${EIGEN2_DIR}) endif() -if (NOT EIGEN2_INCLUDE_DIR) - if (EIGEN2_DIR) - set(EIGEN2_FIND_HINTS "${EIGEN2_DIR}/include/eigen2") - endif() +if (NOT EIGEN_INCLUDE_DIR) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS ${OPENSCAD_LIBDIR}/include/eigen3) +endif() +if (NOT EIGEN_INCLUDE_DIR) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS ${OPENSCAD_LIBDIR}/include/eigen2) +endif() + +if (NOT EIGEN_INCLUDE_DIR) if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") - set(EIGEN2_FIND_PATHS /usr/local/include/eigen2) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/local/include/eigen3) elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") - set(EIGEN2_FIND_PATHS /usr/pkg/include/eigen2) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/pkg/include/eigen3) + elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /opt/local/include/eigen3) else() - set(EIGEN2_FIND_PATHS /opt/local/include/eigen2 /usr/include/eigen2) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/include/eigen3) endif() - find_path(EIGEN2_INCLUDE_DIR - Eigen/Core - HINTS ${EIGEN2_FIND_HINTS} - PATHS ${EIGEN2_FIND_PATHS}) - if (NOT EIGEN2_INCLUDE_DIR) - message(FATAL_ERROR "Eigen2 not found") +endif() + +if (NOT EIGEN_INCLUDE_DIR) + if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/local/include/eigen2) + elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/pkg/include/eigen2) + elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /opt/local/include/eigen2) else() - message(STATUS "Eigen2 found in " ${EIGEN2_INCLUDE_DIR}) + find_path(EIGEN_INCLUDE_DIR Eigen/Core HINTS /usr/include/eigen2) endif() endif() -inclusion(EIGEN2_DIR EIGEN2_INCLUDE_DIR) + +if (NOT EIGEN_INCLUDE_DIR) + message(STATUS "Eigen not found") +else() + message(STATUS "Eigen found in " ${EIGEN_INCLUDE_DIR}) + inclusion(EIGEN_DIR EIGEN_INCLUDE_DIR) +endif() + # OpenCSG if (NOT $ENV{OPENCSGDIR} STREQUAL "") @@ -365,7 +425,8 @@ set(CGAL_SOURCES ../src/CGALCache.cc ../src/PolySetCGALEvaluator.cc ../src/CGAL_Nef_polyhedron_DxfData.cc - ../src/cgaladv_minkowski2.cc) + ../src/cgaladv_minkowski2.cc + ../src/svg.cc) set(COMMON_SOURCES ../src/nodedumper.cc @@ -398,73 +459,79 @@ set(OFFSCREEN_SOURCES add_library(tests-core STATIC ${CORE_SOURCES}) target_link_libraries(tests-core ${OPENGL_LIBRARY}) +set(TESTS-CORE-LIBRARIES ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) + add_library(tests-common STATIC ${COMMON_SOURCES}) target_link_libraries(tests-common tests-core) + add_library(tests-cgal STATIC ${CGAL_SOURCES}) set_target_properties(tests-cgal PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") target_link_libraries(tests-cgal tests-common) +set(TESTS-CGAL-LIBRARIES ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${GMP_LIBRARIES} ${MPFR_LIBRARIES} ${TESTS-CORE-LIBRARIES}) + add_library(tests-nocgal STATIC ${NOCGAL_SOURCES}) target_link_libraries(tests-nocgal tests-common) add_library(tests-offscreen STATIC ${OFFSCREEN_SOURCES}) # set_target_properties(tests-offscreen PROPERTIES COMPILE_FLAGS "-DENABLE_OPENCSG -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") +set(TESTS-NOCGAL-LIBRARIES ${TESTS-CORE-LIBRARIES}) # # echotest # add_executable(echotest echotest.cc) -target_link_libraries(echotest tests-nocgal tests-core ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(echotest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) # # dumptest # add_executable(dumptest dumptest.cc) -target_link_libraries(dumptest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(dumptest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) # # modulecachetest # add_executable(modulecachetest modulecachetest.cc) -target_link_libraries(modulecachetest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(modulecachetest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) # # csgtexttest # add_executable(csgtexttest csgtexttest.cc CSGTextRenderer.cc CSGTextCache.cc) -target_link_libraries(csgtexttest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(csgtexttest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) # # csgtermtest # add_executable(csgtermtest csgtermtest.cc ../src/CSGTermEvaluator.cc) -target_link_libraries(csgtermtest tests-nocgal ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(csgtermtest tests-nocgal ${TESTS-NOCGAL-LIBRARIES}) # # cgaltest # add_executable(cgaltest cgaltest.cc) set_target_properties(cgaltest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(cgaltest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(cgaltest tests-cgal ${TESTS-CGAL-LIBRARIES}) # # cgalstlsanitytest # add_executable(cgalstlsanitytest cgalstlsanitytest.cc) set_target_properties(cgalstlsanitytest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(cgalstlsanitytest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(cgalstlsanitytest tests-cgal ${TESTS-CGAL-LIBRARIES}) # # cgalpngtest # add_executable(cgalpngtest cgalpngtest.cc bboxhelp.cc ../src/CGALRenderer.cc ../src/renderer.cc ../src/rendersettings.cc) set_target_properties(cgalpngtest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(cgalpngtest tests-offscreen tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(cgalpngtest tests-offscreen tests-cgal ${OPENCSG_LIBRARY} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # # cgalcachetest # add_executable(cgalcachetest cgalcachetest.cc bboxhelp.cc) set_target_properties(cgalcachetest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(cgalcachetest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(cgalcachetest tests-cgal ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # # opencsgtest @@ -472,7 +539,7 @@ target_link_libraries(cgalcachetest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_ add_executable(opencsgtest opencsgtest.cc csgtestcore.cc ../src/OpenCSGRenderer.cc ../src/ThrownTogetherRenderer.cc ../src/renderer.cc ../src/rendersettings.cc) set_target_properties(opencsgtest PROPERTIES COMPILE_FLAGS "-DENABLE_OPENCSG -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(opencsgtest tests-offscreen tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENCSG_LIBRARY} ${GLEW_LIBRARY} ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(opencsgtest tests-offscreen tests-cgal ${OPENCSG_LIBRARY} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # # throwntogethertest @@ -480,7 +547,7 @@ target_link_libraries(opencsgtest tests-offscreen tests-cgal ${CGAL_LIBRARY} ${C add_executable(throwntogethertest throwntogethertest.cc csgtestcore.cc ../src/OpenCSGRenderer.cc ../src/ThrownTogetherRenderer.cc ../src/renderer.cc ../src/rendersettings.cc) set_target_properties(throwntogethertest PROPERTIES COMPILE_FLAGS "-DENABLE_OPENCSG -DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}") -target_link_libraries(throwntogethertest tests-offscreen tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENCSG_LIBRARY} ${GLEW_LIBRARY} ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) +target_link_libraries(throwntogethertest tests-offscreen tests-cgal ${OPENCSG_LIBRARY} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY}) # # Tags tests as disabled. This is more convenient than removing them manually @@ -638,7 +705,8 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES} ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-test.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/vector-values.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/search-tests.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/search-tests.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/recursion-tests.scad) list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad @@ -647,7 +715,8 @@ list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES}) list(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad) list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES}) list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/bbox-transform-bug.scad) list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/intersection-prune-test.scad) @@ -704,7 +773,6 @@ set_test_config(Heavy opencsgtest_minkowski3-tests cgalpngtest_minkowski3-tests cgalpngtest_for-tests cgalpngtest_for-nested-tests - cgalpngtest_difference-tests cgalpngtest_intersection-tests) foreach(FILE ${EXAMPLE_FILES}) diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index 990d3a4..a0995fa 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -57,9 +57,11 @@ OffscreenContext *create_offscreen_context(int w, int h) NSOpenGLPixelFormatAttribute attributes[] = { NSOpenGLPFAPixelBuffer, NSOpenGLPFANoRecovery, - NSOpenGLPFAAccelerated, NSOpenGLPFADepthSize, 24, NSOpenGLPFAStencilSize, 8, +// Took out the acceleration requirement to be able to run the tests +// in a non-accelerated VM. +// NSOpenGLPFAAccelerated, (NSOpenGLPixelFormatAttribute) 0 }; NSOpenGLPixelFormat *pixFormat = [[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes] autorelease]; diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc index 08e539e..56861c6 100644 --- a/tests/cgalpngtest.cc +++ b/tests/cgalpngtest.cc @@ -153,30 +153,30 @@ int main(int argc, char **argv) exit(1); } - CGALRenderer cgalRenderer(N); - + CGALRenderer cgalRenderer(N); + BoundingBox bbox; if (cgalRenderer.polyhedron) { CGAL::Bbox_3 cgalbbox = cgalRenderer.polyhedron->bbox(); bbox = BoundingBox(Vector3d(cgalbbox.xmin(), cgalbbox.ymin(), cgalbbox.zmin()), - Vector3d(cgalbbox.xmax(), cgalbbox.ymax(), cgalbbox.zmax())); + Vector3d(cgalbbox.xmax(), cgalbbox.ymax(), cgalbbox.zmax())); } else if (cgalRenderer.polyset) { bbox = cgalRenderer.polyset->getBoundingBox(); } - + Vector3d center = getBoundingCenter(bbox); double radius = getBoundingRadius(bbox); - + Vector3d cameradir(1, 1, -0.5); Vector3d camerapos = center - radius*2*cameradir; csgInfo.glview->setCamera(camerapos, center); - - + + csgInfo.glview->setRenderer(&cgalRenderer); csgInfo.glview->paintGL(); csgInfo.glview->save(outfile); - + delete root_node; delete root_module; diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc index 137f626..52cfb41 100644 --- a/tests/cgalstlsanitytest.cc +++ b/tests/cgalstlsanitytest.cc @@ -129,7 +129,7 @@ int main(int argc, char **argv) CGAL_Nef_polyhedron N = cgalevaluator.evaluateCGALMesh(*root_node); current_path(original_path); - if (!N.empty()) { + if (!N.isNull()) { std::ofstream outfile; outfile.open(outfilename); diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc index e4761db..b546286 100644 --- a/tests/cgaltest.cc +++ b/tests/cgaltest.cc @@ -122,7 +122,7 @@ int main(int argc, char **argv) CGAL_Nef_polyhedron N = cgalevaluator.evaluateCGALMesh(*root_node); current_path(original_path); - if (!N.empty()) { + if (!N.isNull()) { export_stl(&N, std::cout); } diff --git a/tests/regression/cgalpngtest/control-hull-dimension-expected.png b/tests/regression/cgalpngtest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..ceeaf54 --- /dev/null +++ b/tests/regression/cgalpngtest/control-hull-dimension-expected.png diff --git a/tests/regression/cgalpngtest/highlight-modifier-expected.png b/tests/regression/cgalpngtest/highlight-modifier-expected.png Binary files differindex 29a4117..e220aa1 100644 --- a/tests/regression/cgalpngtest/highlight-modifier-expected.png +++ b/tests/regression/cgalpngtest/highlight-modifier-expected.png diff --git a/tests/regression/cgalpngtest/root-modifier-if-expected.png b/tests/regression/cgalpngtest/root-modifier-if-expected.png Binary files differnew file mode 100644 index 0000000..1fe2aa5 --- /dev/null +++ b/tests/regression/cgalpngtest/root-modifier-if-expected.png diff --git a/tests/regression/cgalpngtest/transform-nan-inf-tests-expected.png b/tests/regression/cgalpngtest/transform-nan-inf-tests-expected.png Binary files differnew file mode 100644 index 0000000..2d9c3ba --- /dev/null +++ b/tests/regression/cgalpngtest/transform-nan-inf-tests-expected.png diff --git a/tests/regression/dumptest/background-modifier-expected.txt b/tests/regression/dumptest/background-modifier-expected.txt index 6e9ca57..ed769b3 100644 --- a/tests/regression/dumptest/background-modifier-expected.txt +++ b/tests/regression/dumptest/background-modifier-expected.txt @@ -2,4 +2,7 @@ sphere($fn = 0, $fa = 12, $fs = 2, r = 10); %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } + %group() { + cube(size = [25, 6, 3], center = true); + } diff --git a/tests/regression/dumptest/control-hull-dimension-expected.txt b/tests/regression/dumptest/control-hull-dimension-expected.txt new file mode 100644 index 0000000..be2e4ee --- /dev/null +++ b/tests/regression/dumptest/control-hull-dimension-expected.txt @@ -0,0 +1,5 @@ + hull() { + circle($fn = 0, $fa = 12, $fs = 2, r = 1); + group(); + } + diff --git a/tests/regression/dumptest/highlight-and-background-modifier-expected.txt b/tests/regression/dumptest/highlight-and-background-modifier-expected.txt index a525d68..20c82cc 100644 --- a/tests/regression/dumptest/highlight-and-background-modifier-expected.txt +++ b/tests/regression/dumptest/highlight-and-background-modifier-expected.txt @@ -1,11 +1,17 @@ difference() { sphere($fn = 0, $fa = 12, $fs = 2, r = 10); %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); + %group() { + cube(size = [6, 25, 3], center = true); + } } multmatrix([[1, 0, 0, 13], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { sphere($fn = 0, $fa = 12, $fs = 2, r = 10); %cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); + %group() { + cube(size = [6, 25, 3], center = true); + } } } diff --git a/tests/regression/dumptest/highlight-modifier-expected.txt b/tests/regression/dumptest/highlight-modifier-expected.txt index c0f1da2..c6204bd 100644 --- a/tests/regression/dumptest/highlight-modifier-expected.txt +++ b/tests/regression/dumptest/highlight-modifier-expected.txt @@ -2,4 +2,7 @@ sphere($fn = 0, $fa = 12, $fs = 2, r = 10); cylinder($fn = 0, $fa = 12, $fs = 2, h = 30, r1 = 6, r2 = 6, center = true); } + group() { + cube(size = [25, 6, 3], center = true); + } diff --git a/tests/regression/dumptest/hull3-tests-expected.txt b/tests/regression/dumptest/hull3-tests-expected.txt index af48b7f..4c05e2c 100644 --- a/tests/regression/dumptest/hull3-tests-expected.txt +++ b/tests/regression/dumptest/hull3-tests-expected.txt @@ -17,4 +17,14 @@ } } } + multmatrix([[1, 0, 0, -5], [0, 1, 0, -5], [0, 0, 1, -5], [0, 0, 0, 1]]) { + hull() { + intersection() { + cube(size = [1, 1, 1], center = false); + multmatrix([[1, 0, 0, -1], [0, 1, 0, -1], [0, 0, 1, -1], [0, 0, 0, 1]]) { + cube(size = [1, 1, 1], center = false); + } + } + } + } diff --git a/tests/regression/dumptest/root-modifier-if-expected.txt b/tests/regression/dumptest/root-modifier-if-expected.txt new file mode 100644 index 0000000..dfcd15a --- /dev/null +++ b/tests/regression/dumptest/root-modifier-if-expected.txt @@ -0,0 +1,7 @@ + group() { + sphere($fn = 0, $fa = 12, $fs = 2, r = 5); + } + group() { + cube(size = [5, 5, 5], center = false); + } + diff --git a/tests/regression/echotest/recursion-tests-expected.txt b/tests/regression/echotest/recursion-tests-expected.txt new file mode 100644 index 0000000..f4897ee --- /dev/null +++ b/tests/regression/echotest/recursion-tests-expected.txt @@ -0,0 +1,2 @@ +Recursion detected calling function 'crash' +ECHO: undef diff --git a/tests/regression/opencsgtest/background-modifier-expected.png b/tests/regression/opencsgtest/background-modifier-expected.png Binary files differindex 24149d0..2505331 100644 --- a/tests/regression/opencsgtest/background-modifier-expected.png +++ b/tests/regression/opencsgtest/background-modifier-expected.png diff --git a/tests/regression/opencsgtest/control-hull-dimension-expected.png b/tests/regression/opencsgtest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..52d11c1 --- /dev/null +++ b/tests/regression/opencsgtest/control-hull-dimension-expected.png diff --git a/tests/regression/opencsgtest/difference-tests-expected.png b/tests/regression/opencsgtest/difference-tests-expected.png Binary files differindex 794104a..a6d863a 100644 --- a/tests/regression/opencsgtest/difference-tests-expected.png +++ b/tests/regression/opencsgtest/difference-tests-expected.png diff --git a/tests/regression/opencsgtest/highlight-and-background-modifier-expected.png b/tests/regression/opencsgtest/highlight-and-background-modifier-expected.png Binary files differindex 72d03c3..8febe76 100644 --- a/tests/regression/opencsgtest/highlight-and-background-modifier-expected.png +++ b/tests/regression/opencsgtest/highlight-and-background-modifier-expected.png diff --git a/tests/regression/opencsgtest/highlight-modifier-expected.png b/tests/regression/opencsgtest/highlight-modifier-expected.png Binary files differindex 78d0309..af01e5b 100644 --- a/tests/regression/opencsgtest/highlight-modifier-expected.png +++ b/tests/regression/opencsgtest/highlight-modifier-expected.png diff --git a/tests/regression/opencsgtest/root-modifier-if-expected.png b/tests/regression/opencsgtest/root-modifier-if-expected.png Binary files differnew file mode 100644 index 0000000..5b9a786 --- /dev/null +++ b/tests/regression/opencsgtest/root-modifier-if-expected.png diff --git a/tests/regression/opencsgtest/transform-nan-inf-tests-expected.png b/tests/regression/opencsgtest/transform-nan-inf-tests-expected.png Binary files differnew file mode 100644 index 0000000..c756800 --- /dev/null +++ b/tests/regression/opencsgtest/transform-nan-inf-tests-expected.png diff --git a/tests/regression/throwntogethertest/background-modifier-expected.png b/tests/regression/throwntogethertest/background-modifier-expected.png Binary files differindex 79810f5..2505331 100644 --- a/tests/regression/throwntogethertest/background-modifier-expected.png +++ b/tests/regression/throwntogethertest/background-modifier-expected.png diff --git a/tests/regression/throwntogethertest/control-hull-dimension-expected.png b/tests/regression/throwntogethertest/control-hull-dimension-expected.png Binary files differnew file mode 100644 index 0000000..52d11c1 --- /dev/null +++ b/tests/regression/throwntogethertest/control-hull-dimension-expected.png diff --git a/tests/regression/throwntogethertest/difference-tests-expected.png b/tests/regression/throwntogethertest/difference-tests-expected.png Binary files differindex 183700c..0a27c90 100644 --- a/tests/regression/throwntogethertest/difference-tests-expected.png +++ b/tests/regression/throwntogethertest/difference-tests-expected.png diff --git a/tests/regression/throwntogethertest/highlight-modifier-expected.png b/tests/regression/throwntogethertest/highlight-modifier-expected.png Binary files differindex a1ec8fe..7973d82 100644 --- a/tests/regression/throwntogethertest/highlight-modifier-expected.png +++ b/tests/regression/throwntogethertest/highlight-modifier-expected.png diff --git a/tests/regression/throwntogethertest/root-modifier-if-expected.png b/tests/regression/throwntogethertest/root-modifier-if-expected.png Binary files differnew file mode 100644 index 0000000..5b9a786 --- /dev/null +++ b/tests/regression/throwntogethertest/root-modifier-if-expected.png diff --git a/tests/regression/throwntogethertest/transform-nan-inf-tests-expected.png b/tests/regression/throwntogethertest/transform-nan-inf-tests-expected.png Binary files differnew file mode 100644 index 0000000..b706711 --- /dev/null +++ b/tests/regression/throwntogethertest/transform-nan-inf-tests-expected.png diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 8c57f1c..a2a04ed 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -1,8 +1,8 @@ #!/usr/bin/python -# test_pretty_print copyright 2012 don bright. released under the GPL 2, or -# later, as described in the file named 'COPYING' in OpenSCAD's project root. -# permission to change this license is given to Marius Kintel & Clifford Wolf +# test_pretty_print by don bright 2012. Copyright assigned to Marius Kintel and +# Clifford Wolf 2012. Released under the GPL 2, or later, as described in +# the file named 'COPYING' in OpenSCAD's project root. # # This program 'pretty prints' the ctest output, namely |