diff options
Diffstat (limited to 'macros/luatex/latex/luacas/tex/test/expressions/functions.lua')
-rw-r--r-- | macros/luatex/latex/luacas/tex/test/expressions/functions.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/macros/luatex/latex/luacas/tex/test/expressions/functions.lua b/macros/luatex/latex/luacas/tex/test/expressions/functions.lua new file mode 100644 index 0000000000..e2c15096d6 --- /dev/null +++ b/macros/luatex/latex/luacas/tex/test/expressions/functions.lua @@ -0,0 +1,17 @@ +local a = FunctionExpression("f", + {SymbolExpression("x"), + BinaryOperation.MULEXP + ({SymbolExpression("x"), + Integer(2)})}) + +local b = BinaryOperation.ADDEXP + ({FunctionExpression("g", + {SymbolExpression("x")}), + FunctionExpression("f", + {SymbolExpression("x")}), + Integer(4)}) + +starttest("function expressions") +testeq(a:autosimplify(), parse("f(x, (2 * x))"), a) +testeq(b:autosimplify(), parse("(4 + f(x) + g(x))"), b) +endtest()
\ No newline at end of file |