mirror of https://github.com/vitalif/openscad
Add test case for more complicated recursive function calls.
parent
7531280809
commit
5b29023e6b
|
@ -0,0 +1,12 @@
|
|||
function f() = f() + f();
|
||||
function g() = g(g());
|
||||
|
||||
module m(x) {
|
||||
cube(x);
|
||||
}
|
||||
|
||||
echo(f());
|
||||
|
||||
m(g());
|
||||
|
||||
translate([20, 20, 0]) m(10);
|
|
@ -805,6 +805,7 @@ file(GLOB EXAMPLE_FILES ${CMAKE_SOURCE_DIR}/../examples/*.scad)
|
|||
|
||||
list(APPEND ECHO_FILES ${FUNCTION_FILES}
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/features/for-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/features/function-recursion-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/echo-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/parser-tests.scad
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
|
@ -0,0 +1,7 @@
|
|||
group() {
|
||||
multmatrix([[1, 0, 0, 20], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
group() {
|
||||
cube(size = [10, 10, 10], center = false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
ERROR: Recursion detected calling function 'f'
|
||||
ERROR: Function recursion caught while instantiating module 'echo'
|
||||
ERROR: Recursion detected calling function 'g'
|
||||
ERROR: Function recursion caught while instantiating module 'm'
|
|
@ -1,2 +1,2 @@
|
|||
ERROR: Recursion detected calling function 'crash'
|
||||
ECHO: undef
|
||||
ERROR: Function recursion caught while instantiating module 'echo'
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Loading…
Reference in New Issue