Mercurial > blahgd > fmt4
changeset 1162:5eed88560af7
post fmt3: add tests for various simple math expressions
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
line wrap: on
line diff
--- a/test/CMakeLists.txt Sun Dec 30 11:09:13 2018 -0500 +++ b/test/CMakeLists.txt Sun Jan 27 13:01:41 2019 -0500 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2017 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> +# Copyright (c) 2013-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -22,3 +22,4 @@ add_subdirectory(fmt3-commands) add_subdirectory(fmt3-bugs) +add_subdirectory(fmt3-math)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/CMakeLists.txt Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,26 @@ +# +# Copyright (c) 2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# + +file(GLOB TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.tex) +foreach(TEST ${TESTS}) + simple_c_test(fmt3 math fmt3 ${TEST}) +endforeach()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/add-num-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$1 + 2$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/add-var-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$a + b$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/curly-integer.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +${1}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/curly-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +${a}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/div-num-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2 / 3$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/div-var-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$a / b$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/equal-num-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$5 = 7$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/equal-var-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$a = b$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/float-1.0.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$1.0$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/float-minus1.0.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$-1.0$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/float-plus1.0.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$+1.0$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/frac-1-over-2.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$\frac{1}{2}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/integer-1.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$1$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/integer-minus1.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$-1$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/integer-plus1.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$+1$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/mul-num-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2 * 3$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/mul-var-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$a * b$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/paren-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$(5)$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/paren-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$(a)$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/pow-2-to-3-curly.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2^{3}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/pow-2-to-3.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2^3$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/sqrt-9.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$\sqrt{9}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/subscript-2-3-curly.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2_{3}$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/subscript-2-3.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$2_3$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/subtract-num-num.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$3 - 2$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/fmt3-math/subtract-var-var.tex Sun Jan 27 13:01:41 2019 -0500 @@ -0,0 +1,1 @@ +$a - b$