diff options
Diffstat (limited to 'src/test/scala/chiselTests/UIntOps.scala')
| -rw-r--r-- | src/test/scala/chiselTests/UIntOps.scala | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/test/scala/chiselTests/UIntOps.scala b/src/test/scala/chiselTests/UIntOps.scala index d583c0bb..e5ab706f 100644 --- a/src/test/scala/chiselTests/UIntOps.scala +++ b/src/test/scala/chiselTests/UIntOps.scala @@ -80,7 +80,7 @@ class GoodBoolConversion extends Module { val u = Input(UInt(1.W)) val b = Output(Bool()) }) - io.b := io.u.toBool + io.b := io.u.asBool } class BadBoolConversion extends Module { @@ -88,7 +88,7 @@ class BadBoolConversion extends Module { val u = Input(UInt(5.W)) val b = Output(Bool()) }) - io.b := io.u.toBool + io.b := io.u.asBool } class NegativeShift(t: => Bits) extends Module { @@ -139,5 +139,15 @@ class UIntOpsSpec extends ChiselPropSpec with Matchers { property("Bit extraction on literals should work for all non-negative indices") { assertTesterPasses(new UIntLitExtractTester) } + + property("asBools should support chained apply") { + elaborate(new Module { + val io = IO(new Bundle { + val in = Input(UInt(8.W)) + val out = Output(Bool()) + }) + io.out := io.in.asBools()(2) + }) + } } |
