summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/OptionBundle.scala
diff options
context:
space:
mode:
authorRichard Lin2016-11-21 13:44:26 -0800
committerGitHub2016-11-21 13:44:26 -0800
commit3b4755716a74d4711efa3ce6799742479e17e80b (patch)
tree56652eaa478d5dfd8cddfbe2795c0123d39d230d /src/test/scala/chiselTests/OptionBundle.scala
parentcd6eb41275381a4399a8a88c886110d276bb805c (diff)
parent81e5d00d18a5ba9ae33c10219a270148002fc672 (diff)
Merge pull request #372 from ucb-bar/onetrueliteral
Standardize the One True Way of specifying literals
Diffstat (limited to 'src/test/scala/chiselTests/OptionBundle.scala')
-rw-r--r--src/test/scala/chiselTests/OptionBundle.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/scala/chiselTests/OptionBundle.scala b/src/test/scala/chiselTests/OptionBundle.scala
index 8e4c7579..2ac661ea 100644
--- a/src/test/scala/chiselTests/OptionBundle.scala
+++ b/src/test/scala/chiselTests/OptionBundle.scala
@@ -20,27 +20,27 @@ class OptionBundleModule(hasIn: Boolean) extends Module {
if (hasIn) {
io.out := io.in.get
} else {
- io.out := Bool(false)
+ io.out := false.B
}
}
class SomeOptionBundleTester(expected: Boolean) extends BasicTester {
val mod = Module(new OptionBundleModule(true))
- mod.io.in.get := Bool(expected)
- assert(mod.io.out === Bool(expected))
+ mod.io.in.get := expected.asBool
+ assert(mod.io.out === expected.asBool)
stop()
}
class NoneOptionBundleTester() extends BasicTester {
val mod = Module(new OptionBundleModule(false))
- assert(mod.io.out === Bool(false))
+ assert(mod.io.out === false.B)
stop()
}
class InvalidOptionBundleTester() extends BasicTester {
val mod = Module(new OptionBundleModule(false))
- mod.io.in.get := Bool(true)
- assert(Bool(false))
+ mod.io.in.get := true.B
+ assert(false.B)
stop()
}