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/OptionBundle.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/OptionBundle.scala')
| -rw-r--r-- | src/test/scala/chiselTests/OptionBundle.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/scala/chiselTests/OptionBundle.scala b/src/test/scala/chiselTests/OptionBundle.scala index 1b7be1ec..b23c1f6b 100644 --- a/src/test/scala/chiselTests/OptionBundle.scala +++ b/src/test/scala/chiselTests/OptionBundle.scala @@ -27,21 +27,21 @@ class OptionBundleModule(hasIn: Boolean) extends Module { class SomeOptionBundleTester(expected: Boolean) extends BasicTester { val mod = Module(new OptionBundleModule(true)) mod.io.in.get := Bool(expected) - io.error := mod.io.out != Bool(expected) - io.done := Bool(true) + assert(mod.io.out === Bool(expected)) + stop() } class NoneOptionBundleTester() extends BasicTester { val mod = Module(new OptionBundleModule(true)) - io.error := mod.io.out != Bool(false) - io.done := Bool(true) + assert(mod.io.out === Bool(false)) + stop() } class InvalidOptionBundleTester() extends BasicTester { val mod = Module(new OptionBundleModule(false)) mod.io.in.get := Bool(true) - io.error := UInt(1) - io.done := Bool(true) + assert(Bool(false)) + stop() } class OptionBundleSpec extends ChiselFlatSpec { |
