Removed explicit negation node from test cases.

parent fb5adcac
...@@ -28,12 +28,7 @@ class TestB1Ch10(unittest.TestCase): ...@@ -28,12 +28,7 @@ class TestB1Ch10(unittest.TestCase):
) )
), ),
('-x3*-2x5', ('-x3*-2x5',
N('*', -(L('x') ** L(3)) * - L(2) * L('x') ** L(5)
N('*',
N('-', N('^', L('x'), L(3))),
N('-', L(2))),
N('^', L('x'), L(5))
)
), ),
('(7x2y3)^2/(7x2y3)', ('(7x2y3)^2/(7x2y3)',
N('/', N('/',
......
...@@ -24,7 +24,7 @@ class TestCalc(unittest.TestCase): ...@@ -24,7 +24,7 @@ class TestCalc(unittest.TestCase):
def test_infinity(self): def test_infinity(self):
expressions = [('2^3000', N('^', L(2), L(3000))), expressions = [('2^3000', N('^', L(2), L(3000))),
('2^-3000', N('^', L(2), N('-', L(3000))))] ('2^-3000', N('^', L(2), -L(3000)))]
# ('2^99999999999', None), # ('2^99999999999', None),
# ('2^-99999999999', 0.0)] # ('2^-99999999999', 0.0)]
...@@ -70,7 +70,7 @@ class TestCalc(unittest.TestCase): ...@@ -70,7 +70,7 @@ class TestCalc(unittest.TestCase):
expressions = [ expressions = [
('a^b^c', N('^', a, N('^', b, c))), ('a^b^c', N('^', a, N('^', b, c))),
('-1^b^c', N('-', N('^', L(1), N('^', b, c)))), ('-1^b^c', -N('^', L(1), N('^', b, c))),
('ab^c', N('*', a, N('^', b, c))), ('ab^c', N('*', a, N('^', b, c))),
('a(b)^c', N('*', a, N('^', b, c))), ('a(b)^c', N('*', a, N('^', b, c))),
('a(b+c)^(d+e)', N('*', a, N('^', N('+', b, c), ('a(b+c)^(d+e)', N('*', a, N('^', N('+', b, c),
......
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