summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/Direction.scala
diff options
context:
space:
mode:
authorJim Lawson2016-07-25 08:48:41 -0700
committerJim Lawson2016-07-25 08:48:41 -0700
commit922d43c085585b9eb0276ff2e8e680ca93ec1c2e (patch)
treeb5309c6b94c55e98cf0072e71610e8c026b7d2d8 /src/test/scala/chiselTests/Direction.scala
parent7c9043859994b32bb07d2fce4ae61a7a3362a1b3 (diff)
catch Bad connection exception
Diffstat (limited to 'src/test/scala/chiselTests/Direction.scala')
-rw-r--r--src/test/scala/chiselTests/Direction.scala12
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!")
}
-
}