diff options
author | Marius Kintel <marius@kintel.net> | 2012-01-08 23:22:38 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-01-08 23:22:38 (GMT) |
commit | d3c9654ed5cfed4f03b51f7f1ef14e521b26d446 (patch) | |
tree | 2549f06630f9651f7953e61a035b084555738823 | |
parent | 3c18145b13759db1a8926e29b81fb41f8efcde4d (diff) | |
parent | 28f5f7a91025a077dad07fe4c86f079ab9c735b7 (diff) |
Merge branch 'inftest' of https://github.com/brad/openscad into brad-inftest
-rw-r--r-- | testdata/scad/misc/inf-tests.scad | 23 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/regression/echotest/inf-tests-expected.txt | 23 |
3 files changed, 48 insertions, 1 deletions
diff --git a/testdata/scad/misc/inf-tests.scad b/testdata/scad/misc/inf-tests.scad new file mode 100644 index 0000000..87b6823 --- /dev/null +++ b/testdata/scad/misc/inf-tests.scad @@ -0,0 +1,23 @@ +echo(1/0); +echo(-1/0); +echo(sin(1/0)); +echo(cos(1/0)); +echo(tan(1/0)); +echo(asin(1/0)); +echo(acos(1/0)); +echo(atan(1/0)); +echo(atan(-1/0)); +echo(atan2(1/0, -1/0)); +echo(ceil(1/0)); +echo(floor(1/0)); +echo(exp(2, 1/0)); +echo(ln(1/0)); +echo(log(1/0)); +echo(max(-1/0, 1/0)); +echo(min(-1/0, 1/0)); +echo(pow(2, 1/0)); +echo(round(1/0)); +echo(sign(1/0)); +echo(sign(-1/0)); +echo(sqrt(1/0)); +echo(sqrt(-1/0));
\ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6a3b432..e2f5699 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -600,7 +600,8 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES} ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/builtin-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/dim-all.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-test.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/inf-tests.scad) list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad) diff --git a/tests/regression/echotest/inf-tests-expected.txt b/tests/regression/echotest/inf-tests-expected.txt new file mode 100644 index 0000000..adac240 --- /dev/null +++ b/tests/regression/echotest/inf-tests-expected.txt @@ -0,0 +1,23 @@ +ECHO: inf +ECHO: -inf +ECHO: -nan +ECHO: -nan +ECHO: -nan +ECHO: nan +ECHO: nan +ECHO: 90.0000000000000 +ECHO: -90.000000000000 +ECHO: 135.000000000000 +ECHO: inf +ECHO: inf +ECHO: undef +ECHO: inf +ECHO: inf +ECHO: inf +ECHO: -inf +ECHO: inf +ECHO: inf +ECHO: 1.00000000000000 +ECHO: -1.0000000000000 +ECHO: inf +ECHO: -nan |