From d615d6795ee81e59795081b7fb2524978b6aa9cb Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 30 Oct 2009 01:13:34 -0400 Subject: (Sort of) parse boxes. --- tests/dimension/Makefile.am | 24 ++++++++---------------- tests/dimension/box.pov | 24 ++++++++++++++++++++++++ tests/dimension/box.sh | 22 ++++++++++++++++++++++ tests/dimension/numeric.sh | 2 +- 4 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 tests/dimension/box.pov create mode 100755 tests/dimension/box.sh (limited to 'tests/dimension') diff --git a/tests/dimension/Makefile.am b/tests/dimension/Makefile.am index 8bf7550..36d0989 100644 --- a/tests/dimension/Makefile.am +++ b/tests/dimension/Makefile.am @@ -19,27 +19,19 @@ INCLUDES = -I$(top_srcdir)/libdimension -TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh +TESTS = punctuation.sh numeric.sh strings.sh labels.sh directives.sh box.sh TESTS_ENVIRONMENT = top_builddir=$(top_builddir) -punctuation.sh: - cp $(srcdir)/punctuation.sh . - -numeric.sh: - cp $(srcdir)/numeric.sh . - -strings.sh: - cp $(srcdir)/strings.sh . - -labels.sh: - cp $(srcdir)/labels.sh . - -directives.sh: - cp $(srcdir)/directives.sh . +%.sh: + cp $(srcdir)/$@ . EXTRA_DIST = $(TESTS) \ punctuation.pov \ numeric.pov \ strings.pov \ labels.pov \ - directives.pov + directives.pov \ + box.pov + +clean-local: + rm *.png diff --git a/tests/dimension/box.pov b/tests/dimension/box.pov new file mode 100644 index 0000000..47b1cde --- /dev/null +++ b/tests/dimension/box.pov @@ -0,0 +1,24 @@ +/************************************************************************* + * Copyright (C) 2009 Tavian Barnes * + * * + * This file is part of The Dimension Test Suite. * + * * + * The Dimension Test Suite is free software; you can redistribute it * + * and/or modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation; either version 3 of the * + * License, or (at your option) any later version. * + * * + * The Dimension Test Suite is distributed in the hope that it will be * + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty * + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *************************************************************************/ + +// Render a box + +box { + <-1, -1, -1>, <1, 1, 1> +} diff --git a/tests/dimension/box.sh b/tests/dimension/box.sh new file mode 100755 index 0000000..244b6fa --- /dev/null +++ b/tests/dimension/box.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +######################################################################### +# Copyright (C) 2009 Tavian Barnes # +# # +# This file is part of The Dimension Test Suite. # +# # +# The Dimension Test Suite is free software; you can redistribute it # +# and/or modify it under the terms of the GNU General Public License as # +# published by the Free Software Foundation; either version 3 of the # +# License, or (at your option) any later version. # +# # +# The Dimension Test Suite is distributed in the hope that it will be # +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty # +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # +# General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +######################################################################### + +${top_builddir}/dimension/dimension -o box.png ${srcdir}/box.pov diff --git a/tests/dimension/numeric.sh b/tests/dimension/numeric.sh index b64c218..d4b4d89 100755 --- a/tests/dimension/numeric.sh +++ b/tests/dimension/numeric.sh @@ -20,7 +20,7 @@ ######################################################################### numeric=$(${top_builddir}/dimension/dimension --tokenize ${srcdir}/numeric.pov) -numeric_exp='((int "1") (int "123456789") (int "01234567") (int "0x123456789") - (int "0x01") (float ".1") (float "0.1") (float "1.0") (float "0.123456789") - (float "0.123456789") < (int "1") , (float "2.2") , - (float "3.03") >)' +numeric_exp='((integer "1") (integer "123456789") (integer "01234567") (integer "0x123456789") - (integer "0x01") (float ".1") (float "0.1") (float "1.0") (float "0.123456789") - (float "0.123456789") < (integer "1") , (float "2.2") , - (float "3.03") >)' if [ "$numeric" != "$numeric_exp" ]; then echo "numeric.pov tokenized as \"$numeric\"" >&2 -- cgit v1.2.3