diff options
Diffstat (limited to 'src/test/scala/chiselTests/util')
| -rw-r--r-- | src/test/scala/chiselTests/util/BitPatSpec.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/util/BitPatSpec.scala b/src/test/scala/chiselTests/util/BitPatSpec.scala index a6c0acf7..ca8dd85c 100644 --- a/src/test/scala/chiselTests/util/BitPatSpec.scala +++ b/src/test/scala/chiselTests/util/BitPatSpec.scala @@ -14,4 +14,8 @@ class BitPatSpec extends AnyFlatSpec with Matchers { val testPattern = "0" * 32 + "1" * 32 + "?" * 32 + "?01" * 32 BitPat("b" + testPattern).toString should be (s"BitPat($testPattern)") } + + it should "not fail if BitPat width is 0" in { + intercept[IllegalArgumentException]{BitPat("b")} + } } |
