From f7c2d467f0c9a992fe58293268728f4687c6394b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Thu, 2 Feb 2012 22:55:52 +0100 Subject: Test cases for #78 diff --git a/testdata/scad/misc/include-tests-template.scad b/testdata/scad/misc/include-tests-template.scad index 6724a6d..43bda57 100644 --- a/testdata/scad/misc/include-tests-template.scad +++ b/testdata/scad/misc/include-tests-template.scad @@ -25,6 +25,15 @@ include //Test with absolute path include <@CMAKE_SOURCE_DIR@/../testdata/scad/misc/sub2/test7.scad> +// Test simple MCAD include +include + +// Test MCAD include which includes another file +include + +// Test MCAD include which uses another file +include + module test1() { test2(); @@ -36,6 +45,11 @@ module test1() //Just to give a top level object translate([0,-2,0]) sphere(test2_variable, $fn=16); + + // MCAD + translate([0,-4,0]) cube([TAU/4,0.5,0.5], center=true); + translate([-2,-4,0]) cube([deg(0.5)/20,0.5,0.5], center=true); + translate([2,-4,-0.5]) scale(0.05) alignds420([0,0,0], [0,0,0]); } test1(); diff --git a/testdata/scad/misc/use-tests-template.scad b/testdata/scad/misc/use-tests-template.scad index c39efce..47a62a2 100644 --- a/testdata/scad/misc/use-tests-template.scad +++ b/testdata/scad/misc/use-tests-template.scad @@ -25,6 +25,15 @@ use //Test with absolute path include <@CMAKE_SOURCE_DIR@/../testdata/scad/misc/sub2/test7.scad> +// Test simple MCAD library +include + +// Test MCAD library which includes another file +include + +// Test MCAD library which uses another file +include + module test1() { test2(); @@ -38,6 +47,11 @@ module test1() // test2_variable won't be visible translate([0,-2,0]) sphere(test2_variable, $fn=16); + + // MCAD + translate([0,-4,0]) roundedBox([0.5,1.5,0.5], 0.2, true); + translate([-2,-4,0]) cube([deg(0.5)/20,0.5,0.5], center=true); + translate([2,-4,-0.5]) scale(0.05) alignds420([0,0,0], [0,0,0]); } test1(); -- cgit v0.10.1