diff options
| author | Schuyler Eldridge | 2020-06-22 20:34:46 -0400 |
|---|---|---|
| committer | GitHub | 2020-06-22 20:34:46 -0400 |
| commit | 9f44b593efe4830aeb56d17f5ed59277a74832f8 (patch) | |
| tree | ac43010dd7fc2a14303497f95e12f2a40bb16d0e /src/test/scala/chiselTests/UIntOps.scala | |
| parent | d099d01ae6b11d8befdf7b32ab74c3167a552984 (diff) | |
| parent | b5e59895e13550006fd8e951b7e9483de00f82dd (diff) | |
Merge pull request #1481 from freechipsproject/driver-deprecations
Remove Deprecated Usages of chisel3.Driver, CircuitForm
Diffstat (limited to 'src/test/scala/chiselTests/UIntOps.scala')
| -rw-r--r-- | src/test/scala/chiselTests/UIntOps.scala | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/test/scala/chiselTests/UIntOps.scala b/src/test/scala/chiselTests/UIntOps.scala index 0c7e2dcd..a13077ba 100644 --- a/src/test/scala/chiselTests/UIntOps.scala +++ b/src/test/scala/chiselTests/UIntOps.scala @@ -4,6 +4,7 @@ package chiselTests import chisel3._ import org.scalatest._ +import chisel3.stage.ChiselStage import chisel3.testers.BasicTester import org.scalacheck.Shrink import org.scalatest.matchers.should.Matchers @@ -112,21 +113,21 @@ class UIntLitExtractTester extends BasicTester { stop() } -class UIntOpsSpec extends ChiselPropSpec with Matchers { +class UIntOpsSpec extends ChiselPropSpec with Matchers with Utils { // Disable shrinking on error. implicit val noShrinkListVal = Shrink[List[Int]](_ => Stream.empty) implicit val noShrinkInt = Shrink[Int](_ => Stream.empty) property("Bools can be created from 1 bit UInts") { - elaborate(new GoodBoolConversion) + ChiselStage.elaborate(new GoodBoolConversion) } property("Bools cannot be created from >1 bit UInts") { - a [Exception] should be thrownBy { elaborate(new BadBoolConversion) } + a [Exception] should be thrownBy extractCause[Exception] { ChiselStage.elaborate(new BadBoolConversion) } } property("UIntOps should elaborate") { - elaborate { new UIntOps } + ChiselStage.elaborate { new UIntOps } } property("UIntOpsTester should return the correct result") { @@ -134,7 +135,9 @@ class UIntOpsSpec extends ChiselPropSpec with Matchers { } property("Negative shift amounts are invalid") { - a [ChiselException] should be thrownBy { elaborate(new NegativeShift(UInt())) } + a [ChiselException] should be thrownBy extractCause[ChiselException] { + ChiselStage.elaborate(new NegativeShift(UInt())) + } } property("Bit extraction on literals should work for all non-negative indices") { @@ -142,7 +145,7 @@ class UIntOpsSpec extends ChiselPropSpec with Matchers { } property("asBools should support chained apply") { - elaborate(new Module { + ChiselStage.elaborate(new Module { val io = IO(new Bundle { val in = Input(UInt(8.W)) val out = Output(Bool()) @@ -151,4 +154,3 @@ class UIntOpsSpec extends ChiselPropSpec with Matchers { }) } } - |
