From 7fac96bfc4926cb4efecc66610deff0ab10a23b4 Mon Sep 17 00:00:00 2001 From: fdai7763 Date: Wed, 24 Jan 2024 00:30:04 +0100 Subject: [PATCH] added test for negative coefficient --- src/test/py/test_read_math_function.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/py/test_read_math_function.py b/src/test/py/test_read_math_function.py index c5fb7d6..0cdcefc 100644 --- a/src/test/py/test_read_math_function.py +++ b/src/test/py/test_read_math_function.py @@ -67,6 +67,9 @@ class ReadFunction(unittest.TestCase): def test_easy_function_linear_constant_gets_simplified(self): self.assertEqual(simplify_easy_math_function("v", "42x+42^(2)+1-3*4/3"), [1761, "42x"]) + def test_easy_function_linear_constant_gets_simplified_negative_coefficient(self): + self.assertEqual(simplify_easy_math_function("v", "-42x+42^(2)+1-3*4/3"), [1761, "-42x"]) + if __name__ == '__main__': unittest.main()