simple failed UOp sub symbolic test case (#5894)

This commit is contained in:
chenyu 2024-08-03 14:27:23 -04:00 committed by GitHub
parent 937bf5fe12
commit da61dea1b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -97,6 +97,10 @@ class TestSymbolic(unittest.TestCase):
def test_sub_num_1(self):
self.helper_test_variable(Variable("a", 0, 8)-NumNode(1), -1, 7, "(-1+a)")
def test_sub_self(self):
a = Variable("a", 0, 8)
self.helper_test_variable(a*3-a, 0, 16, "(a*2)")
def test_mul_0(self):
self.helper_test_variable(Variable("a", 0, 8)*0, 0, 0, "0")

View File

@ -152,6 +152,11 @@ class TestSymbolic(unittest.TestCase):
def test_sub_num_1(self):
self.helper_test_variable(Variable("a", 0, 8)-NumNode(1), -1, 7, {"(-1+a)", "(a+(-1))"})
@unittest.expectedFailure
def test_sub_self(self):
a = Variable("a", 0, 8)
self.helper_test_variable(a*3-a, 0, 16, "(a*2)")
def test_mul_0(self):
self.helper_test_variable(Variable("a", 0, 8)*0, 0, 0, "0")