diff options
| author | Albert Magyar | 2020-06-08 12:14:10 -0700 |
|---|---|---|
| committer | GitHub | 2020-06-08 19:14:10 +0000 |
| commit | 99ac8a134b134713913036013ffdec98ec92c73a (patch) | |
| tree | 481c3a78aa6beee72a6956a6e78251ad7b33842a /src/test/scala | |
| parent | 161938b84013a6c3307abc2707f541deddf487b4 (diff) | |
Report Builder.error errors as exceptions outside hardware context (#1425)
* Immediately throw Builder.error errors outside hardware context
* Add example of hidden no-hardware-context error from #1422
Co-authored-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/test/scala')
| -rw-r--r-- | src/test/scala/chiselTests/ImplicitConversionsSpec.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/ImplicitConversionsSpec.scala b/src/test/scala/chiselTests/ImplicitConversionsSpec.scala index d5939b24..bde43717 100644 --- a/src/test/scala/chiselTests/ImplicitConversionsSpec.scala +++ b/src/test/scala/chiselTests/ImplicitConversionsSpec.scala @@ -39,5 +39,10 @@ class ImplicitConversionsSpec extends ChiselFlatSpec { import chisel3.util._ assertTypeError("Decoupled(UInt(8.W)).target") } -} + "X.B for X not in [0,1]" should "throw an exception, even outside hardware context" in { + a [ChiselException] should be thrownBy { + 65.B + } + } +} |
