Commit 20c54e4e authored by Taddeus Kroes's avatar Taddeus Kroes

Added some tests for derivative operator precedence.

parent bd1b0a53
......@@ -73,7 +73,6 @@ class Parser(BisonParser):
('left', ('NEG', )),
('right', ('POW', )),
('right', ('FUNCTION', )),
#('right', ('SIN', 'COS', 'TAN', 'SOLVE', 'INT', 'SQRT')),
)
interactive = 0
......
......@@ -70,5 +70,7 @@ class TestParser(unittest.TestCase):
self.assertEqual(tree('d/dx x ^ 2'), der(exp, x))
self.assertEqual(tree('d / dx x ^ 2'), der(exp, x))
self.assertEqual(tree('d/dx x ^ 2 + x'), der(exp, x) + x)
self.assertEqual(tree('d/dx (x ^ 2 + x)'), der(exp + x, x))
self.assertEqual(tree('d/d'), d / d)
# FIXME: self.assertEqual(tree('d(x ^ 2)/dx'), der(exp, x))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment