diff options
Diffstat (limited to 'src/test/scala/firrtlTests/AnnotationTests.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/AnnotationTests.scala | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/test/scala/firrtlTests/AnnotationTests.scala b/src/test/scala/firrtlTests/AnnotationTests.scala index 8acada93..29f8f51a 100644 --- a/src/test/scala/firrtlTests/AnnotationTests.scala +++ b/src/test/scala/firrtlTests/AnnotationTests.scala @@ -2,7 +2,7 @@ package firrtlTests -import java.io.{File, FileWriter, StringWriter, Writer} +import java.io.{File, FileWriter, Writer} import firrtl.annotations.AnnotationYamlProtocol._ import firrtl.annotations._ @@ -20,14 +20,14 @@ trait AnnotationSpec extends LowTransformSpec { def transform = new CustomResolveAndCheck(LowForm) // Check if Annotation Exception is thrown - override def failingexecute(writer: Writer, annotations: AnnotationMap, input: String): Exception = { + override def failingexecute(annotations: AnnotationMap, input: String): Exception = { intercept[AnnotationException] { - compile(CircuitState(parse(input), ChirrtlForm, Some(annotations)), writer) + compile(CircuitState(parse(input), ChirrtlForm, Some(annotations)), Seq.empty) } } - def execute(writer: Writer, annotations: AnnotationMap, input: String, check: Annotation): Unit = { - val cr = compile(CircuitState(parse(input), ChirrtlForm, Some(annotations)), writer) - cr.annotations.get.annotations should be (Seq(check)) + def execute(annotations: AnnotationMap, input: String, check: Annotation): Unit = { + val cr = compile(CircuitState(parse(input), ChirrtlForm, Some(annotations)), Seq.empty) + cr.annotations.get.annotations should contain (check) } } @@ -53,9 +53,8 @@ class AnnotationTests extends AnnotationSpec with Matchers { val cName = ComponentName("c", mName) "Loose and Sticky annotation on a node" should "pass through" in { - val w = new StringWriter() val ta = Annotation(cName, classOf[Transform], "") - execute(w, getAMap(ta), input, ta) + execute(getAMap(ta), input, ta) } "Annotations" should "be readable from file" in { |
