diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-11-04 22:19:29 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-11-04 22:19:29 -0500 |
commit | eb0bde2d4dc1bdb6653ee216764c373066222b79 (patch) | |
tree | 20cfd039f19e0a426e00afca5f4c3f8a5855bbe2 /tests | |
parent | 5bde27bf4b3064a94131b71019469464023a6f63 (diff) | |
download | dimension-eb0bde2d4dc1bdb6653ee216764c373066222b79.tar.xz |
Parse arithmetic expressions.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dimension/demo.pov | 4 | ||||
-rwxr-xr-x | tests/dimension/demo.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/dimension/demo.pov b/tests/dimension/demo.pov index 386fdd0..24d934a 100644 --- a/tests/dimension/demo.pov +++ b/tests/dimension/demo.pov @@ -20,9 +20,9 @@ // Render demo scene box { - <-1.0, -1.0, -1.0>, <1.0, 1.0, 1.0> + <-2.0 + 1, -2/2.0, -1.0>, <1.0, (1.0 + 2)*2 - 5, 1.0 + 2*2 - 4> } sphere { - <0, 0, 0>, 1.25 + <1/5 + -1/5, 1/5.0 - 1.0/5, 0>, 1.25 } diff --git a/tests/dimension/demo.sh b/tests/dimension/demo.sh index 7674fd4..bd05f3d 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 "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)))' +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)))' if [ "$demo" != "$demo_exp" ]; then echo "demo.pov parsed as \"$demo\"" >&2 |