new tests for render (not validate yet)

This commit is contained in:
Lafrite 2015-03-07 18:23:44 +01:00
parent e031f9b903
commit 4841aef478

View File

@ -67,12 +67,14 @@ class TestTexRender(unittest.TestCase):
[ 2, 3, op.mul, 4, op.add],\
[ 2, 3, 4, op.mul, op.add],\
[ 2, 3, 4, op.add, op.add],\
[ 2, 3, 4, op.add, op.sub],\
]
wanted_render = [\
'( 2 + 3 ) \\times 4',\
'2 \\times 3 + 4',\
'2 + 3 \\times 4',\
'2 + 3 + 4',\
'2 - ( 3 + 4 )',\
]
for (i,e) in enumerate(exps):
rend = tex(e)
@ -92,8 +94,8 @@ class TestTexRender(unittest.TestCase):
'2 + 3 x^{ 2 } + 2 x + 1' ,\
'2 - ( 3 x^{ 2 } + 2 x + 1 )' ,\
'2 - ( 3 x^{ 2 } + 2 x + 1 ) ( 3 x^{ 2 } + 2 x + 1 )' ,\
'( 6 x^{ 2 } + 5 x + 4 ) + 3 x^{ 2 } + 2 x + 1' ,\
'( 6 x^{ 2 } + 5 x + 4 ) - ( 3 x^{ 2 } + 2 x + 1 )' ,\
'6 x^{ 2 } + 5 x + 4 + 3 x^{ 2 } + 2 x + 1' ,\
'6 x^{ 2 } + 5 x + 4 - ( 3 x^{ 2 } + 2 x + 1 )' ,\
]
for (i,e) in enumerate(exps):
rend = tex(e)