summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/UInt.scala
diff options
context:
space:
mode:
authorHenry Cook2015-11-06 13:23:24 -0800
committerHenry Cook2015-11-06 13:25:07 -0800
commit7fe61318433a8ecaac80ef2b547a88ab9dc04aec (patch)
tree466be7da48a2dfe57b37ada346ebaf01e82389f8 /src/test/scala/chiselTests/UInt.scala
parent89c5d10c81808406b6ae684e1e122d440466280c (diff)
added elaboration tests for remaining old Chisel3 examples
Diffstat (limited to 'src/test/scala/chiselTests/UInt.scala')
-rw-r--r--src/test/scala/chiselTests/UInt.scala34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/test/scala/chiselTests/UInt.scala b/src/test/scala/chiselTests/UInt.scala
deleted file mode 100644
index 3c5e1ab7..00000000
--- a/src/test/scala/chiselTests/UInt.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-// See LICENSE for license details.
-
-package chiselTests
-
-import Chisel._
-import org.scalatest._
-import org.scalatest.prop._
-import Chisel.testers.BasicTester
-
-class GoodBoolConversion extends Module {
- val io = new Bundle {
- val u = UInt(1, width = 1).asInput
- val b = Bool(OUTPUT)
- }
- io.b := io.u.toBool
-}
-
-class BadBoolConversion extends Module {
- val io = new Bundle {
- val u = UInt(1, width = 5).asInput
- val b = Bool(OUTPUT)
- }
- io.b := io.u.toBool
-}
-
-class UIntSpec extends ChiselPropSpec with Matchers {
- property("Bools can be created from 1 bit UInts") {
- elaborate(new GoodBoolConversion)
- }
-
- property("Bools cannot be created from >1 bit UInts") {
- a [Exception] should be thrownBy { elaborate(new BadBoolConversion) }
- }
-}