diff options
| author | Adam Izraelevitz | 2015-12-11 17:21:36 -0800 |
|---|---|---|
| committer | Adam Izraelevitz | 2015-12-11 17:21:36 -0800 |
| commit | b8cd46de6c01febdbdba7ecb83db494bad8a7a94 (patch) | |
| tree | c3a0f10dd286ae2bba50c31b987ab39c45189898 /src/test/scala/chiselTests/GCD.scala | |
| parent | bffc67c2bbeb107d2ff9903aa35e85fbb7da73f9 (diff) | |
| parent | dbd072172f6312893e1922e48ed768ae0fab9a89 (diff) | |
Merge pull request #67 from ucb-bar/asserttest
Refactor tests to use stop() and assert() instead of io.error/io.done
Diffstat (limited to 'src/test/scala/chiselTests/GCD.scala')
| -rw-r--r-- | src/test/scala/chiselTests/GCD.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/scala/chiselTests/GCD.scala b/src/test/scala/chiselTests/GCD.scala index 529f9964..8fdf8db0 100644 --- a/src/test/scala/chiselTests/GCD.scala +++ b/src/test/scala/chiselTests/GCD.scala @@ -32,8 +32,8 @@ class GCDTester(a: Int, b: Int, z: Int) extends BasicTester { dut.io.e := first when(first) { first := Bool(false) } when(dut.io.v) { - io.done := Bool(true) - io.error := (dut.io.z != UInt(z)).toUInt + assert(dut.io.z === UInt(z)) + stop() } } @@ -46,7 +46,7 @@ class GCDSpec extends ChiselPropSpec { ("a", "b", "z"), // First tuple defines column names ( 64, 48, 16), // Subsequent tuples define the data ( 12, 9, 3), - ( 48, 64, 12)) + ( 48, 64, 16)) property("GCD should elaborate") { elaborate { new GCD } |
