hdl.dsl: further clarify error message for incorrect nesting.
Fixes #133.
This commit is contained in:
parent
cb8be4a1b0
commit
da1f58b7ae
2 changed files with 12 additions and 4 deletions
|
|
@ -345,7 +345,8 @@ class DSLTestCase(FHDLTestCase):
|
|||
m = Module()
|
||||
with m.Switch(self.s1):
|
||||
with self.assertRaises(SyntaxError,
|
||||
msg="If is not permitted directly inside of Switch"):
|
||||
msg="If is not permitted directly inside of Switch; "
|
||||
"it is permitted inside of Switch Case"):
|
||||
with m.If(self.s2):
|
||||
pass
|
||||
|
||||
|
|
@ -486,7 +487,8 @@ class DSLTestCase(FHDLTestCase):
|
|||
with m.State("FOO"):
|
||||
pass
|
||||
with self.assertRaises(SyntaxError,
|
||||
msg="If is not permitted directly inside of FSM"):
|
||||
msg="If is not permitted directly inside of FSM; "
|
||||
"it is permitted inside of FSM State"):
|
||||
with m.If(self.s2):
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue