hdl.ast: make Signal(name=) a keyword-only argument.
Almost no code would specify Signal(_, name) as a positional argument on purpose, but forgetting parens and accidentally placing signedness into the name position is so common that we had a test for it.
This commit is contained in:
parent
2da0133d52
commit
649444449d
2 changed files with 1 additions and 7 deletions
|
|
@ -582,12 +582,6 @@ class SignalTestCase(FHDLTestCase):
|
|||
s2 = Signal(name="sig")
|
||||
self.assertEqual(s2.name, "sig")
|
||||
|
||||
def test_name_bad(self):
|
||||
with self.assertRaises(TypeError,
|
||||
msg="Name must be a string, not 'True'"):
|
||||
# A common typo: forgetting to put parens around width and signedness
|
||||
Signal(1, True)
|
||||
|
||||
def test_reset(self):
|
||||
s1 = Signal(4, reset=0b111, reset_less=True)
|
||||
self.assertEqual(s1.reset, 0b111)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue