diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/CheckSpec.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/CheckSpec.scala b/src/test/scala/firrtlTests/CheckSpec.scala index f03b6611..aa154bab 100644 --- a/src/test/scala/firrtlTests/CheckSpec.scala +++ b/src/test/scala/firrtlTests/CheckSpec.scala @@ -333,6 +333,23 @@ class CheckSpec extends FlatSpec with Matchers { } } + s"Defnames that conflict with pure-FIRRTL module names" should "throw an exception" in { + val input = + s"""|circuit bar : + | module bar : + | input i : UInt<8> + | output o : UInt<8> + | o <= i + | extmodule dup : + | input i : UInt<8> + | output o : UInt<8> + | defname = bar + |""".stripMargin + assertThrows[CheckHighForm.DefnameConflictException] { + checkHighInput(input) + } + } + } object CheckSpec { |
