diff options
| author | Adam Izraelevitz | 2016-11-30 18:15:49 -0600 |
|---|---|---|
| committer | GitHub | 2016-11-30 18:15:49 -0600 |
| commit | a10899e910bc3649d32a77c85513076504e93f6a (patch) | |
| tree | e294f8b7a37daf30aa0d1c07460606dbf10e35c9 /src/test/scala/firrtlTests/transforms | |
| parent | 66d3ec0498a73319a914eeffcb4e0b1109b5f4c5 (diff) | |
Bugfix: Dedup aggressively (ignore comments) (#375)
FileInfo is merged
Diffstat (limited to 'src/test/scala/firrtlTests/transforms')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/DedupTests.scala | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/transforms/DedupTests.scala b/src/test/scala/firrtlTests/transforms/DedupTests.scala index 1bcd711c..a17e6ae1 100644 --- a/src/test/scala/firrtlTests/transforms/DedupTests.scala +++ b/src/test/scala/firrtlTests/transforms/DedupTests.scala @@ -89,6 +89,44 @@ class DedupModuleTests extends HighTransformSpec { val aMap = new AnnotationMap(Nil) execute(writer, aMap, input, check) } + "The module A and B with comments" should "be deduped" in { + val input = + """circuit Top : + | module Top : + | inst a1 of A + | inst a2 of A_ + | module A : @[yy 2:2] + | output x: UInt<1> @[yy 2:2] + | inst b of B @[yy 2:2] + | x <= b.x @[yy 2:2] + | module A_ : @[xx 1:1] + | output x: UInt<1> @[xx 1:1] + | inst b of B_ @[xx 1:1] + | x <= b.x @[xx 1:1] + | module B : + | output x: UInt<1> + | x <= UInt(1) + | module B_ : + | output x: UInt<1> + | x <= UInt(1) + """.stripMargin + val check = + """circuit Top : + | module Top : + | inst a1 of A + | inst a2 of A + | module A : @[yy 2:2 xx 1:1] + | output x: UInt<1> @[yy 2:2 xx 1:1] + | inst b of B @[yy 2:2 xx 1:1] + | x <= b.x @[yy 2:2 xx 1:1] + | module B : + | output x: UInt<1> + | x <= UInt(1) + """.stripMargin + val writer = new StringWriter() + val aMap = new AnnotationMap(Nil) + execute(writer, aMap, input, check) + } } // Execution driven tests for inlining modules |
