aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/transforms/DedupTests.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/transforms/DedupTests.scala b/src/test/scala/firrtlTests/transforms/DedupTests.scala
index d4fe54a1..9b949274 100644
--- a/src/test/scala/firrtlTests/transforms/DedupTests.scala
+++ b/src/test/scala/firrtlTests/transforms/DedupTests.scala
@@ -532,5 +532,26 @@ class DedupModuleTests extends HighTransformSpec {
cs.annotations.toSeq should not contain (SingleTargetDummyAnnotation(A.ref("x")))
cs.deletedAnnotations.isEmpty should be (true)
}
+ "main" should "not be deduped even if it's the last module" in {
+ val input =
+ """circuit main:
+ | module dupe:
+ | input in: UInt<8>
+ | output out: UInt<8>
+ | out <= in
+ | module main:
+ | input in: UInt<8>
+ | output out: UInt<8>
+ | out <= in
+ """.stripMargin
+ val check =
+ """circuit main:
+ | module main:
+ | input in: UInt<8>
+ | output out: UInt<8>
+ | out <= in
+ """.stripMargin
+ execute(input, check, Seq.empty)
+ }
}