diff options
Diffstat (limited to 'src/test/scala/firrtlTests/transforms')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala | 33 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/DedupTests.scala | 2 |
2 files changed, 4 insertions, 31 deletions
diff --git a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala index bf294fe9..4c550c46 100644 --- a/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala +++ b/src/test/scala/firrtlTests/transforms/BlacklBoxSourceHelperSpec.scala @@ -4,39 +4,12 @@ package firrtlTests.transforms import firrtl.annotations.{Annotation, CircuitName, ModuleName} import firrtl.transforms._ -import firrtl.{AnnotationMap, FIRRTLException, Transform, VerilogCompiler} +import firrtl.{FIRRTLException, Transform, VerilogCompiler} import firrtlTests.{HighTransformSpec, LowTransformSpec} import org.scalacheck.Test.Failed import org.scalatest.{FreeSpec, Matchers, Succeeded} -/** - * Tests inline instances transformation - */ -class BlacklBoxSourceHelperSpec extends FreeSpec with Matchers { - "BlackBoxSourceAnnotations" - { - val modName = ModuleName("dog", CircuitName("fox")) - val resource = "file://somefile.v" - - "should parse and unparse" in { - - val serialized = BlackBoxResource(resource).serialize - BlackBoxSource.parse(serialized) match { - case Some(BlackBoxResource(id)) => - id should be (resource) - Succeeded - case _ => Failed - } - } - "should fail on unsupported kinds" in { - intercept[FIRRTLException] { - BlackBoxSourceAnnotation(modName, "bad value") - } - BlackBoxSourceAnnotation(modName, BlackBoxResource(resource).serialize).isInstanceOf[Annotation] should be(true) - } - } -} - class BlacklBoxSourceHelperTransformSpec extends LowTransformSpec { def transform: Transform = new BlackBoxSourceHelper @@ -79,8 +52,8 @@ class BlacklBoxSourceHelperTransformSpec extends LowTransformSpec { "annotated external modules" should "appear in output directory" in { val annos = Seq( - Annotation(moduleName, classOf[BlackBoxSourceHelper], BlackBoxTargetDir("test_run_dir").serialize), - Annotation(moduleName, classOf[BlackBoxSourceHelper], BlackBoxResource("/blackboxes/AdderExtModule.v").serialize) + BlackBoxTargetDirAnno("test_run_dir"), + BlackBoxResourceAnno(moduleName, "/blackboxes/AdderExtModule.v") ) execute(input, output, annos) diff --git a/src/test/scala/firrtlTests/transforms/DedupTests.scala b/src/test/scala/firrtlTests/transforms/DedupTests.scala index 74c4b4e7..e88bd506 100644 --- a/src/test/scala/firrtlTests/transforms/DedupTests.scala +++ b/src/test/scala/firrtlTests/transforms/DedupTests.scala @@ -8,7 +8,7 @@ import org.scalatest.Matchers import org.scalatest.junit.JUnitRunner import firrtl.ir.Circuit -import firrtl.{Parser, AnnotationMap} +import firrtl.Parser import firrtl.passes.PassExceptions import firrtl.annotations.{ Named, |
