diff options
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/chiselTests/naming/NamePluginSpec.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/naming/NamePluginSpec.scala b/src/test/scala/chiselTests/naming/NamePluginSpec.scala index fc90264d..946b557a 100644 --- a/src/test/scala/chiselTests/naming/NamePluginSpec.scala +++ b/src/test/scala/chiselTests/naming/NamePluginSpec.scala @@ -203,5 +203,23 @@ class NamePluginSpec extends ChiselFlatSpec with Utils { y } } + + "Nested val declarations" should "all be named" in { + class Test extends MultiIOModule { + { + val a = { + val b = { + val c = Wire(UInt(3.W)) + Wire(UInt(3.W)) + } + Wire(UInt(3.W)) + } + } + } + + aspectTest(() => new Test) { + top: Test => Select.wires(top).map(_.instanceName) should be (List("a_b_c", "a_b", "a")) + } + } } |
