From 5c57ed41e7136cc9c2efcb2353a2394fc442d718 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 15 Jan 2014 19:24:38 -0500 Subject: Added test for empty geometry diff --git a/testdata/scad/misc/empty-shape-tests.scad b/testdata/scad/misc/empty-shape-tests.scad new file mode 100644 index 0000000..2b1a98c --- /dev/null +++ b/testdata/scad/misc/empty-shape-tests.scad @@ -0,0 +1,28 @@ +linear_extrude(h=1) { + square(0); + circle(0); + polygon(); + import(); +} + +cube(0); +sphere(0); +cylinder(0); +polyhedron(); +import(); +surface(); +rotate_extrude(); +linear_extrude(); +translate(); +color(); +hull(); +minkowski(); +union(); +difference(); +intersection(); +render(); +projection(); +assign(); +if(1) { } +intersection_for(); +for(); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6e1f905..053dbf9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -841,7 +841,8 @@ list(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include- ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles-test.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles_dir/localfiles-compatibility-test.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/rotate-empty-bbox.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/rotate-empty-bbox.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/empty-shape-tests.scad) list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES}) list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/intersection-prune-test.scad) diff --git a/tests/regression/cgalpngtest/empty-shape-tests-expected.png b/tests/regression/cgalpngtest/empty-shape-tests-expected.png new file mode 100644 index 0000000..50d838c Binary files /dev/null and b/tests/regression/cgalpngtest/empty-shape-tests-expected.png differ diff --git a/tests/regression/opencsgtest/empty-shape-tests-expected.png b/tests/regression/opencsgtest/empty-shape-tests-expected.png new file mode 100644 index 0000000..50d838c Binary files /dev/null and b/tests/regression/opencsgtest/empty-shape-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/empty-shape-tests-expected.png b/tests/regression/throwntogethertest/empty-shape-tests-expected.png new file mode 100644 index 0000000..50d838c Binary files /dev/null and b/tests/regression/throwntogethertest/empty-shape-tests-expected.png differ -- cgit v0.10.1