aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/firrtlTests/fixed')
-rw-r--r--src/test/scala/firrtlTests/fixed/FixedPointMathSpec.scala8
-rw-r--r--src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala8
2 files changed, 2 insertions, 14 deletions
diff --git a/src/test/scala/firrtlTests/fixed/FixedPointMathSpec.scala b/src/test/scala/firrtlTests/fixed/FixedPointMathSpec.scala
index 0c30b59e..39da2a33 100644
--- a/src/test/scala/firrtlTests/fixed/FixedPointMathSpec.scala
+++ b/src/test/scala/firrtlTests/fixed/FixedPointMathSpec.scala
@@ -2,8 +2,6 @@
package firrtlTests.fixed
-import java.io.StringWriter
-
import firrtl.{CircuitState, ChirrtlForm, LowFirrtlCompiler, Parser, AnnotationMap}
import firrtl.Parser.IgnoreInfo
import firrtlTests.FirrtlFlatSpec
@@ -41,11 +39,9 @@ class FixedPointMathSpec extends FirrtlFlatSpec {
val lowerer = new LowFirrtlCompiler
- val writer = new StringWriter()
-
- lowerer.compile(CircuitState(parse(input), ChirrtlForm), writer)
+ val res = lowerer.compileAndEmit(CircuitState(parse(input), ChirrtlForm))
- val output = writer.toString.split("\n")
+ val output = res.getEmittedCircuit.value split "\n"
def inferredAddWidth: Int = {
val binaryDifference = binaryPoint1 - binaryPoint2
diff --git a/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala b/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala
index 44fa1d29..37209786 100644
--- a/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala
+++ b/src/test/scala/firrtlTests/fixed/FixedTypeInferenceSpec.scala
@@ -20,14 +20,6 @@ class FixedTypeInferenceSpec extends FirrtlFlatSpec {
lines should contain(e)
}
}
- private def executeTest(input: String, expected: Seq[String], compiler: Compiler) = {
- val writer = new StringWriter()
- compiler.compile(CircuitState(parse(input), ChirrtlForm), writer)
- val lines = writer.toString().split("\n") map normalized
- expected foreach { e =>
- lines should contain(e)
- }
- }
"Fixed types" should "infer add correctly" in {
val passes = Seq(