Commit 7ec4d99c authored by Taddeus Kroes's avatar Taddeus Kroes

Added a unit test.

parent 821bdb8f
...@@ -135,6 +135,9 @@ class TestLine(unittest.TestCase): ...@@ -135,6 +135,9 @@ class TestLine(unittest.TestCase):
mul = N('*', a, l2) mul = N('*', a, l2)
self.assertEquals(generate_line(mul), 'a * 2') self.assertEquals(generate_line(mul), 'a * 2')
mul = N('*', l2, N('^', a, l2))
self.assertEquals(generate_line(mul), '2 * a ^ 2')
def test_plus_to_minus(self): def test_plus_to_minus(self):
plus = N('+', L(1), -L(2)) plus = N('+', L(1), -L(2))
self.assertEquals(generate_line(plus), '1 - 2') self.assertEquals(generate_line(plus), '1 - 2')
......
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