hdl.ast: simplify enum handling.

This commit is contained in:
whitequark 2019-10-11 11:16:00 +00:00
parent d72d4a55fd
commit 7ff4c6ce43
2 changed files with 10 additions and 15 deletions

View file

@ -346,7 +346,7 @@ class OperatorTestCase(FHDLTestCase):
def test_matches_enum(self):
s = Signal.enum(SignedEnum)
self.assertRepr(s.matches(SignedEnum.FOO), """
(== (& (sig s) (const 2'd3)) (const 2'd3))
(== (sig s) (const 1'sd-1))
""")
def test_matches_width_wrong(self):