summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/FixedPointSpec.scala
diff options
context:
space:
mode:
authorAndrew Waterman2017-12-08 17:06:19 -0800
committerJack Koenig2017-12-08 17:06:19 -0800
commit66d687d9c7af34e9d7a061feba309ec7a6dbd261 (patch)
tree7c7ad57b6c0a0686751626a546586fbdc78373ae /src/test/scala/chiselTests/FixedPointSpec.scala
parent81fa4f2418faf70b0f2dbf758cad93e923ee5607 (diff)
Reject negative shift amounts; add tests (#730)
Closes #729
Diffstat (limited to 'src/test/scala/chiselTests/FixedPointSpec.scala')
-rw-r--r--src/test/scala/chiselTests/FixedPointSpec.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/FixedPointSpec.scala b/src/test/scala/chiselTests/FixedPointSpec.scala
index 8caa7f1e..ff4b42a0 100644
--- a/src/test/scala/chiselTests/FixedPointSpec.scala
+++ b/src/test/scala/chiselTests/FixedPointSpec.scala
@@ -126,4 +126,7 @@ class FixedPointSpec extends ChiselPropSpec {
property("should mux different widths and binary points") {
assertTesterPasses { new FixedPointMuxTester }
}
+ property("Negative shift amounts are invalid") {
+ a [ChiselException] should be thrownBy { elaborate(new NegativeShift(FixedPoint(1.W, 0.BP))) }
+ }
}