diff options
| author | Andrew Waterman | 2016-04-14 23:36:46 -0700 |
|---|---|---|
| committer | Andrew Waterman | 2016-04-14 23:36:46 -0700 |
| commit | 09ce36e79ba5a999d0e47ec482bbf06857cf7043 (patch) | |
| tree | 098e0cc5fa975508c2f31fe9d46ae1745051cb4c /src/test/scala/chiselTests/Counter.scala | |
| parent | 8368c10da3442f5c74ca4c90f5442a1a97b57ea5 (diff) | |
Disallow Counters with negative n
One could make an argument for disallowing n=0, too, but HW generators
will benefit from our leniency.
Closes #107. Thanks @jackkoenig
Diffstat (limited to 'src/test/scala/chiselTests/Counter.scala')
| -rw-r--r-- | src/test/scala/chiselTests/Counter.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/scala/chiselTests/Counter.scala b/src/test/scala/chiselTests/Counter.scala index d5cd7e5d..07a76cdc 100644 --- a/src/test/scala/chiselTests/Counter.scala +++ b/src/test/scala/chiselTests/Counter.scala @@ -41,7 +41,7 @@ class CounterSpec extends ChiselPropSpec { } property("Counter can be en/disabled") { - forAll(safeUInts) { (seed: Int) => assertTesterPasses{ new EnableTester(seed) } } + forAll(safeUInts) { (seed: Int) => whenever(seed >= 0) { assertTesterPasses{ new EnableTester(seed) } } } } property("Counter should wrap") { |
