Implement RFC 39: Change semantics of no-argument m.Case().

This commit is contained in:
Wanda 2024-01-13 12:35:52 +01:00 committed by Catherine
parent eb1c55859e
commit 86d14f584e
5 changed files with 25 additions and 8 deletions

View file

@ -682,7 +682,7 @@ class OperatorTestCase(FHDLTestCase):
def test_matches(self):
s = Signal(4)
self.assertRepr(s.matches(), "(const 1'd1)")
self.assertRepr(s.matches(), "(const 1'd0)")
self.assertRepr(s.matches(1), """
(== (sig s) (const 1'd1))
""")

View file

@ -366,7 +366,7 @@ class DSLTestCase(FHDLTestCase):
)
""")
def test_Switch_default_Case(self):
def test_Switch_empty_Case(self):
m = Module()
with m.Switch(self.w1):
with m.Case(3):
@ -378,7 +378,6 @@ class DSLTestCase(FHDLTestCase):
(
(switch (sig w1)
(case 0011 (eq (sig c1) (const 1'd1)))
(default (eq (sig c2) (const 1'd1)))
)
)
""")