aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala
diff options
context:
space:
mode:
authorJack Koenig2019-02-22 13:59:33 -0800
committermergify[bot]2019-02-22 21:59:33 +0000
commit0ace0218d3151df2d102463dd682128a88ae7be6 (patch)
tree1e7728ceb4b7cd160e3547decc4be1ef77d5aeda /src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala
parent50d9571bc26c445fd9ebaeb3c06d80d598397405 (diff)
Stop reporting exceptions in custom transformations as internal errors (#867)
Instead, just forward the exception
Diffstat (limited to 'src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala')
-rw-r--r--src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala
index de84d79d..c75e0914 100644
--- a/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala
+++ b/src/test/scala/firrtlTests/annotationTests/EliminateTargetPathsSpec.scala
@@ -260,16 +260,19 @@ class EliminateTargetPathsSpec extends FirrtlPropSpec with FirrtlMatchers {
| m2.i <= m1.o
| o <= m2.o
""".stripMargin
- intercept[NoSuchTargetException] {
+ val e1 = the [CustomTransformException] thrownBy {
val Top_m1 = Top.instOf("m1", "MiddleX")
val inputState = CircuitState(parse(input), ChirrtlForm, Seq(DummyAnnotation(Top_m1)))
new LowFirrtlCompiler().compile(inputState, customTransforms)
}
- intercept[NoSuchTargetException] {
+ e1.cause shouldBe a [NoSuchTargetException]
+
+ val e2 = the [CustomTransformException] thrownBy {
val Top_m2 = Top.instOf("x2", "Middle")
val inputState = CircuitState(parse(input), ChirrtlForm, Seq(DummyAnnotation(Top_m2)))
new LowFirrtlCompiler().compile(inputState, customTransforms)
}
+ e2.cause shouldBe a [NoSuchTargetException]
}
property("No name conflicts between two new modules") {