diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/chiselTests/Direction.scala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/Direction.scala b/src/test/scala/chiselTests/Direction.scala index e22e120b..bb01f0eb 100644 --- a/src/test/scala/chiselTests/Direction.scala +++ b/src/test/scala/chiselTests/Direction.scala @@ -31,7 +31,15 @@ class DirectionSpec extends ChiselPropSpec { } property("Inputs should not be assignable") { - elaborate(new BadDirection) + var excepts: Boolean = false + try elaborate(new BadDirection) + catch { + case e: Exception => { + excepts = true + } + // Should except so this is okay + // Ideally, would throw and catch more precise exception + } + assert(excepts, "Bad connection should have thrown exception!") } - } |
