diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/graph/DiGraphTests.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/graph/DiGraphTests.scala b/src/test/scala/firrtlTests/graph/DiGraphTests.scala index 147b22d7..a0f45c80 100644 --- a/src/test/scala/firrtlTests/graph/DiGraphTests.scala +++ b/src/test/scala/firrtlTests/graph/DiGraphTests.scala @@ -1,3 +1,5 @@ +// See LICENSE for license details. + package firrtlTests.graph import java.io._ @@ -50,6 +52,16 @@ class DiGraphTests extends FirrtlFlatSpec { a [CyclicException] should be thrownBy cyclicGraph.linearize + try { + cyclicGraph.linearize + } + catch { + case c: CyclicException => + c.getMessage.contains("found at a") should be (true) + c.node.asInstanceOf[String] should be ("a") + case _: Throwable => + } + acyclicGraph.reverse.getEdgeMap should equal (reversedAcyclicGraph.getEdgeMap) degenerateGraph.getEdgeMap should equal (degenerateGraph.reverse.getEdgeMap) |
