hdl.ast: Value.matches() with no arguments should return C(1).
The behavior of the following must be always the same: - `with m.Switch(v): with m.Case(*pats):` - `with m.If(v.matches(*pats)):`
This commit is contained in:
parent
9aeb22311f
commit
ef2e9fa809
3 changed files with 3 additions and 2 deletions
|
|
@ -599,7 +599,7 @@ class OperatorTestCase(FHDLTestCase):
|
|||
|
||||
def test_matches(self):
|
||||
s = Signal(4)
|
||||
self.assertRepr(s.matches(), "(const 1'd0)")
|
||||
self.assertRepr(s.matches(), "(const 1'd1)")
|
||||
self.assertRepr(s.matches(1), """
|
||||
(== (sig s) (const 1'd1))
|
||||
""")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue