summaryrefslogtreecommitdiffstats
path: root/tests/dimension/demo.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-20 15:31:13 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-20 15:31:13 -0500
commitf26515125e950b452023e3e8bddcc371861bcbf8 (patch)
tree31012debd2c0fa27c9f223989c2d468b52ba97b3 /tests/dimension/demo.sh
parente1c53c53d04c8693be00e00804e8e3280dc9dac6 (diff)
downloaddimension-f26515125e950b452023e3e8bddcc371861bcbf8.tar.xz
Evaluate arithmetic expressions during parsing when possible.
This is needed for conditionals to work, and for declared identifiers to be evaluated only once.
Diffstat (limited to 'tests/dimension/demo.sh')
-rwxr-xr-xtests/dimension/demo.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/dimension/demo.sh b/tests/dimension/demo.sh
index bd05f3d..816a317 100755
--- a/tests/dimension/demo.sh
+++ b/tests/dimension/demo.sh
@@ -20,8 +20,8 @@
#########################################################################
demo=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/demo.pov)
-demo_exp='(box { < - (float "2.0") + (integer "1") , - (integer "2") / (float "2.0") , - (float "1.0") > , < (float "1.0") , \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , (float "1.0") + (integer "2") * (integer "2") - (integer "4") > } sphere { < (integer "1") / (integer "5") + - (integer "1") / (integer "5") , (integer "1") / (float "5.0") - (float "1.0") / (integer "5") , (integer "0") > , (float "1.25") })
-((box (vector (+ (- (float 2)) (integer 1)) (/ (- (integer 2)) (float 2)) (- (float 1))) (vector (float 1) (- (* (+ (float 1) (integer 2)) (integer 2)) (integer 5)) (- (+ (float 1) (* (integer 2) (integer 2))) (integer 4)))) (sphere (vector (+ (/ (integer 1) (integer 5)) (/ (- (integer 1)) (integer 5))) (- (/ (integer 1) (float 5)) (/ (float 1) (integer 5))) (integer 0)) (float 1.25)))'
+demo_exp='(box { < - (float "2.0") + (integer "1") , - (integer "2") / (float "2.0") , - (float "1.0") > , < (float "1.0") , \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , (float "1.0") + (integer "2") * (integer "2") - (integer "4") > } sphere { < (integer "1") / (integer "5") + - (integer "1") / (integer "5") , (integer "1") / (float "5.0") - (float "1.0") / (integer "5") , - (integer "1") - - (integer "1") > , (float "1.25") })
+((box (vector (float -1) (float -1) (float -1)) (vector (float 1) (float 1) (float 1))) (sphere (vector (float 0) (float 0) (integer 0)) (float 1.25)))'
if [ "$demo" != "$demo_exp" ]; then
echo "demo.pov parsed as \"$demo\"" >&2