From 7fe61318433a8ecaac80ef2b547a88ab9dc04aec Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Fri, 6 Nov 2015 13:23:24 -0800 Subject: added elaboration tests for remaining old Chisel3 examples --- src/test/scala/chiselTests/UInt.scala | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/test/scala/chiselTests/UInt.scala (limited to 'src/test/scala/chiselTests/UInt.scala') 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) } - } -} -- cgit v1.2.3