mirror of https://github.com/vitalif/openscad
Test case for #399
parent
a3cd019494
commit
d9b3f7b52b
|
@ -0,0 +1,27 @@
|
|||
function foo() = search(undef,undef);
|
||||
|
||||
if (false && foo()) {
|
||||
echo("Fail");
|
||||
} else {
|
||||
echo("Pass");
|
||||
}
|
||||
|
||||
if (true || foo()) {
|
||||
echo("Pass");
|
||||
} else {
|
||||
echo("Fail");
|
||||
}
|
||||
|
||||
if (true && true) {
|
||||
echo("Pass");
|
||||
}
|
||||
|
||||
if (false || true) {
|
||||
echo("Pass");
|
||||
}
|
||||
|
||||
function ternarytest() = true ? true : foo();
|
||||
|
||||
if (ternarytest()) {
|
||||
echo("Pass");
|
||||
}
|
|
@ -779,7 +779,8 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES}
|
|||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests2.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/variable-scope-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/lookup-tests.scad)
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/lookup-tests.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/expression-shortcircuit-tests.scad)
|
||||
|
||||
list(APPEND DUMPTEST_FILES ${FEATURES_FILES} ${EXAMPLE_FILES})
|
||||
list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
ECHO: "Pass"
|
||||
ECHO: "Pass"
|
||||
ECHO: "Pass"
|
||||
ECHO: "Pass"
|
||||
ECHO: "Pass"
|
Loading…
Reference in New Issue