summaryrefslogtreecommitdiffstats
path: root/tests/dimension
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dimension')
-rw-r--r--tests/dimension/Makefile.am4
-rw-r--r--tests/dimension/demo.pov (renamed from tests/dimension/box.pov)9
-rwxr-xr-xtests/dimension/demo.sh (renamed from tests/dimension/box.sh)14
3 files changed, 14 insertions, 13 deletions
diff --git a/tests/dimension/Makefile.am b/tests/dimension/Makefile.am
index 36d0989..214c88a 100644
--- a/tests/dimension/Makefile.am
+++ b/tests/dimension/Makefile.am
@@ -19,7 +19,7 @@
INCLUDES = -I$(top_srcdir)/libdimension
-TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh box.sh
+TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh demo.sh
TESTS_ENVIRONMENT = top_builddir=$(top_builddir)
%.sh:
@@ -31,7 +31,7 @@ EXTRA_DIST = $(TESTS) \
strings.pov \
labels.pov \
directives.pov \
- box.pov
+ demo.pov
clean-local:
rm *.png
diff --git a/tests/dimension/box.pov b/tests/dimension/demo.pov
index 762e5df..386fdd0 100644
--- a/tests/dimension/box.pov
+++ b/tests/dimension/demo.pov
@@ -17,11 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*************************************************************************/
-// Render a box
+// Render demo scene
box {
- <-0.125, -1, -1>, <0.125, 1, 1>
+ <-1.0, -1.0, -1.0>, <1.0, 1.0, 1.0>
}
-box {
- <-1, -1, -0.125>, <1, 1, 0.125>
+
+sphere {
+ <0, 0, 0>, 1.25
}
diff --git a/tests/dimension/box.sh b/tests/dimension/demo.sh
index 7a9f754..7674fd4 100755
--- a/tests/dimension/box.sh
+++ b/tests/dimension/demo.sh
@@ -19,14 +19,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#########################################################################
-box=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/box.pov)
-box_exp='(box { < - (float "0.125") , - (integer "1") , - (integer "1") > , < (float "0.125") , (integer "1") , (integer "1") > } box { < - (integer "1") , - (integer "1") , - (float "0.125") > , < (integer "1") , (integer "1") , (float "0.125") > })
-((box (vector (float -0.125) (float -1) (float -1)) (vector (float 0.125) (float 1) (float 1))) (box (vector (float -1) (float -1) (float -0.125)) (vector (float 1) (float 1) (float 0.125))))'
+demo=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/demo.pov)
+demo_exp='(box { < - (float "1.0") , - (float "1.0") , - (float "1.0") > , < (float "1.0") , (float "1.0") , (float "1.0") > } sphere { < (integer "0") , (integer "0") , (integer "0") > , (float "1.25") })
+((box (vector (float -1) (float -1) (float -1)) (vector (float 1) (float 1) (float 1))) (sphere (vector (float 0) (float 0) (float 0)) (float 1.25)))'
-if [ "$box" != "$box_exp" ]; then
- echo "box.pov parsed as \"$box\"" >&2
- echo " -- expected \"$box_exp\"" >&2
+if [ "$demo" != "$demo_exp" ]; then
+ echo "demo.pov parsed as \"$demo\"" >&2
+ echo " -- expected \"$demo_exp\"" >&2
exit 1
fi
-${top_builddir}/dimension/dimension -o box.png ${srcdir}/box.pov
+${top_builddir}/dimension/dimension -o demo.png ${srcdir}/demo.pov