From 8e0651afd456612dc0cbcec83e11f27dcf216a02 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Fri, 2 Sep 2011 14:31:56 +0200 Subject: Added union-tests diff --git a/testdata/scad/features/union-tests.scad b/testdata/scad/features/union-tests.scad new file mode 100644 index 0000000..718aa8c --- /dev/null +++ b/testdata/scad/features/union-tests.scad @@ -0,0 +1,29 @@ +translate([-12,0,0]) union() { + cube([10,10,10]); + translate([4,4,8]) cube([2,2,10]); +} + +union() { + cube([10,10,10]); + translate([0,0,10]) cube([2,2,10]); +} + +translate([12,0,0]) union() { + cube([10,10,10]); + translate([0,0,11]) cube([2,2,10]); +} + +translate([24,0,0]) union() { + cube([10,10,10]); + translate([4,4,10]) cube([2,2,10]); +} + +translate([-12,12,0]) union() { + cube([10,10,10]); + translate([-2,10,10]) cube([2,2,10]); +} + +translate([0,12,0]) union() { + cube([10,10,10]); + translate([0,10,10]) cube([2,2,10]); +} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bb346a4..109b69f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -206,7 +206,8 @@ LIST(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/square-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cube-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/features/sphere-tests.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cylinder-tests.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cylinder-tests.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/union-tests.scad) #LIST(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES}) diff --git a/tests/regression/cgalpngtest/union-tests-expected.png b/tests/regression/cgalpngtest/union-tests-expected.png new file mode 100644 index 0000000..c390f42 Binary files /dev/null and b/tests/regression/cgalpngtest/union-tests-expected.png differ -- cgit v0.10.1