diff options
Diffstat (limited to 'src/test/scala/firrtlTests/InlineInstancesTests.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/InlineInstancesTests.scala | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/test/scala/firrtlTests/InlineInstancesTests.scala b/src/test/scala/firrtlTests/InlineInstancesTests.scala index 89862145..25a194d4 100644 --- a/src/test/scala/firrtlTests/InlineInstancesTests.scala +++ b/src/test/scala/firrtlTests/InlineInstancesTests.scala @@ -2,8 +2,6 @@ package firrtlTests -import java.io.StringWriter - import org.scalatest.FlatSpec import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner @@ -49,9 +47,8 @@ class InlineInstancesTests extends LowTransformSpec { | i$b <= i$a | b <= i$b | i$a <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("Inline", CircuitName("Top"))))) - execute(writer, aMap, input, check) + execute(aMap, input, check) } "The all instances of Simple" should "be inlined" in { @@ -83,9 +80,8 @@ class InlineInstancesTests extends LowTransformSpec { | b <= i1$b | i0$a <= a | i1$a <= i0$b""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("Simple", CircuitName("Top"))))) - execute(writer, aMap, input, check) + execute(aMap, input, check) } "Only one instance of Simple" should "be inlined" in { @@ -119,9 +115,8 @@ class InlineInstancesTests extends LowTransformSpec { | input a : UInt<32> | output b : UInt<32> | b <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ComponentName("i0",ModuleName("Top", CircuitName("Top")))))) - execute(writer, aMap, input, check) + execute(aMap, input, check) } "All instances of A" should "be inlined" in { @@ -165,9 +160,8 @@ class InlineInstancesTests extends LowTransformSpec { | i$b <= i$a | b <= i$b | i$a <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - execute(writer, aMap, input, check) + execute(aMap, input, check) } "Non-inlined instances" should "still prepend prefix" in { @@ -205,9 +199,8 @@ class InlineInstancesTests extends LowTransformSpec { | input a : UInt<32> | output b : UInt<32> | b <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - execute(writer, aMap, input, check) + execute(aMap, input, check) } // ---- Errors ---- @@ -224,9 +217,8 @@ class InlineInstancesTests extends LowTransformSpec { | extmodule A : | input a : UInt<32> | output b : UInt<32>""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - failingexecute(writer, aMap, input) + failingexecute(aMap, input) } // 2) ext instance "External instance" should "not be inlined" in { @@ -241,9 +233,8 @@ class InlineInstancesTests extends LowTransformSpec { | extmodule A : | input a : UInt<32> | output b : UInt<32>""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - failingexecute(writer, aMap, input) + failingexecute(aMap, input) } // 3) no module "Inlined module" should "exist" in { @@ -253,9 +244,8 @@ class InlineInstancesTests extends LowTransformSpec { | input a : UInt<32> | output b : UInt<32> | b <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - failingexecute(writer, aMap, input) + failingexecute(aMap, input) } // 4) no inst "Inlined instance" should "exist" in { @@ -265,9 +255,8 @@ class InlineInstancesTests extends LowTransformSpec { | input a : UInt<32> | output b : UInt<32> | b <= a""".stripMargin - val writer = new StringWriter() val aMap = new AnnotationMap(Seq(InlineAnnotation(ModuleName("A", CircuitName("Top"))))) - failingexecute(writer, aMap, input) + failingexecute(aMap, input) } } |
