diff options
| author | Paul Rigge | 2016-11-10 15:04:17 -0800 |
|---|---|---|
| committer | ducky | 2016-11-21 12:48:10 -0800 |
| commit | 9192dc67a0a3b2abb1914ea5472c33c944908a80 (patch) | |
| tree | 927020b4402e3b803088be0578620b5ef5f94c27 /src/test | |
| parent | 87144822597c51fc010ab4aaca2db48904dce029 (diff) | |
Incorporate feedback.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/chiselTests/RangeSpec.scala | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/test/scala/chiselTests/RangeSpec.scala b/src/test/scala/chiselTests/RangeSpec.scala index b18e9d2a..8734c4d5 100644 --- a/src/test/scala/chiselTests/RangeSpec.scala +++ b/src/test/scala/chiselTests/RangeSpec.scala @@ -8,12 +8,11 @@ import org.scalatest.{Matchers, FreeSpec} class RangeSpec extends FreeSpec with Matchers { "Ranges can be specified for UInt, SInt, and FixedPoint" - { "to specify a UInt" in { - val x = UInt(range"[0, 8)") - x.getWidth should be (3) - - println(range"[4,32)") + UInt(range"[0, 8)").getWidth should be (3) UInt(range"[0, 8]").getWidth should be (4) + + UInt(range"[0, 0]").getWidth should be (1) } "to specify an SInt" in { @@ -22,6 +21,8 @@ class RangeSpec extends FreeSpec with Matchers { SInt(range"[0, 8]").getWidth should be (5) SInt(range"[-4, 4)").getWidth should be (3) + + SInt(range"[0, 0]").getWidth should be (1) } "it should check that the range is valid for UInt" in { @@ -44,8 +45,6 @@ class RangeSpec extends FreeSpec with Matchers { an [IllegalArgumentException] should be thrownBy { UInt(range"(0,0)") } - - UInt(range"[0, 0]").getWidth should be (1) } "it should check that the range is valid for SInt" in { @@ -64,8 +63,6 @@ class RangeSpec extends FreeSpec with Matchers { an [IllegalArgumentException] should be thrownBy { SInt(range"(0,0)") } - - SInt(range"[0, 0]").getWidth should be (1) } } } |
