diff options
Diffstat (limited to 'tests/dimension')
-rw-r--r-- | tests/dimension/arithexp.pov | 64 | ||||
-rwxr-xr-x | tests/dimension/arithexp.sh | 13 |
2 files changed, 65 insertions, 12 deletions
diff --git a/tests/dimension/arithexp.pov b/tests/dimension/arithexp.pov index 5e27612..0411e19 100644 --- a/tests/dimension/arithexp.pov +++ b/tests/dimension/arithexp.pov @@ -23,3 +23,67 @@ sphere { 2*<<2.0 - 1.0, 3.0, 4.0>.x, (1.0 + 2)*2 - 5, 1.0 + 2*2 - 4> - -<0, 0, 1>, exp(1) - 1*2 } + +#if (abs(-1) != 1) + #error "abs" +#end + +#if (acos(0) != 1.570796326794897) + #error "acos" +#end + +#if (acosh(2) != 1.316957896924817) + #error "acosh" +#end + +#if (asc("ABC") != 65) + #error "asc" +#end + +#if (asin(1) != 1.570796326794897) + #error "asin" +#end + +#if (asinh(2) != 1.44363547517881) + #error "asinh" +#end + +#if (atan(1) != 0.7853981633974483) + #error "atan" +#end + +#if (atan2(-1, -1) != -2.35619449019234) + #error "atan2" +#end + +#if (atanh(0.5) != 0.5493061443340548) + #error "atanh" +#end + +#if (ceil(-1.5) != -1) + #error "ceil" +#end + +#if (cos(1.570796326794897) != 0) + #error "cos" +#end + +#if (cosh(1.316957896924817) != 2) + #error "cosh" +#end + +#if (degrees(1.570796326794897) != 90) + #error "degrees" +#end + +#if (div(3,2) != 1) + #error "div" +#end + +#if (exp(1) != 2.718281828459045) + #error "exp" +#end + +#if (floor(-1.5) != -2) + #error "floor" +#end diff --git a/tests/dimension/arithexp.sh b/tests/dimension/arithexp.sh index 6572646..0829e49 100755 --- a/tests/dimension/arithexp.sh +++ b/tests/dimension/arithexp.sh @@ -19,19 +19,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # ######################################################################### -arithexp=$(${top_builddir}/dimension/dimension --tokenize --parse ${srcdir}/arithexp.pov) +arithexp=$(${top_builddir}/dimension/dimension --parse ${srcdir}/arithexp.pov) arithexp_exp="$(echo -n \ -'(sphere { - (integer "2") * - < < (float "2.0") - (float "1.0") , (float "3.0") , (float "4.0") > . x , - \( (float "1.0") + (integer "2") \) * (integer "2") - (integer "5") , - (float "1.0") + (integer "2") * (integer "2") - (integer "4") > - - - - < (integer "0") , (integer "0") , (integer "1") > , - exp \( (integer "1") \) - (integer "1") * (integer "2") - })' \ -| tr '\n' ' ' | sed -r 's/[[:space:]]+/ /g') -$(echo -n \ '((sphere (vector (float 2) (float 2) (float 3) (integer 0) (integer 0)) (float 0.718282) |