summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/ChiselSpec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/chiselTests/ChiselSpec.scala')
-rw-r--r--src/test/scala/chiselTests/ChiselSpec.scala8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/ChiselSpec.scala b/src/test/scala/chiselTests/ChiselSpec.scala
index 1fe77a0e..88aaf06c 100644
--- a/src/test/scala/chiselTests/ChiselSpec.scala
+++ b/src/test/scala/chiselTests/ChiselSpec.scala
@@ -10,8 +10,8 @@ import Chisel.testers._
/** Common utility functions for Chisel unit tests. */
trait ChiselRunners {
- def execute(t: => BasicTester): Boolean = TesterDriver.execute(t)
- def elaborate(t: => Module): Circuit = TesterDriver.elaborate(t)
+ def execute(t: => BasicTester): Boolean = TesterDriver.execute(() => t)
+ def elaborate(t: => Module): Circuit = Driver.elaborate(() => t)
}
/** Spec base class for BDD-style testers. */
@@ -19,11 +19,9 @@ class ChiselFlatSpec extends FlatSpec with ChiselRunners with Matchers
/** Spec base class for property-based testers. */
class ChiselPropSpec extends PropSpec with ChiselRunners with PropertyChecks {
- /** Returns the number of 1s in the binary representation of the input. */
- def popCount(n: Long): Int = n.toBinaryString.count(_ == '1')
// Generator for small positive integers.
- val smallPosInts = Gen.choose(1, 7)
+ val smallPosInts = Gen.choose(1, 4)
// Generator for widths considered "safe".
val safeUIntWidth = Gen.choose(1, 30)