def test_xx_3x_2_eval(self): x = X() f = Add(Add(Mul(x, x), Mul(Number(3), x)), Number(2)) # f(x) = x**2 + 3x + 2 self.assertEqual(f.eval(10), 132)
def test_2x_3_eval(self): f = Add(Mul(Number(2), X()), Number(3)) # f(x) = 2x + 3 self.assertEqual(f.eval(10), 23)