diff options
| author | Aditya Naik | 2023-11-23 03:11:56 -0800 |
|---|---|---|
| committer | Aditya Naik | 2023-11-23 03:11:56 -0800 |
| commit | af415532cf160e63e971ceb301833b8433c18a50 (patch) | |
| tree | 1fef70139846f57298c8e24a590490a74249f7dd /src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala | |
| parent | 8200c0cdf1d471453946d5ae24bc99757b2ef02d (diff) | |
cleanup
Diffstat (limited to 'src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala')
| -rw-r--r-- | src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala b/src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala deleted file mode 100644 index 451ba885..00000000 --- a/src/test/scala/chiselTests/ChiselTestUtilitiesSpec.scala +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -package chiselTests - -import chisel3._ -import org.scalatest.exceptions.TestFailedException - -class ChiselTestUtilitiesSpec extends ChiselFlatSpec { - // Who tests the testers? - "assertKnownWidth" should "error when the expected width is wrong" in { - intercept[TestFailedException] { - assertKnownWidth(7) { - Wire(UInt(8.W)) - } - } - } - - it should "error when the width is unknown" in { - intercept[ChiselException] { - assertKnownWidth(7) { - Wire(UInt()) - } - } - } - - it should "work if the width is correct" in { - assertKnownWidth(8) { - Wire(UInt(8.W)) - } - } - - "assertInferredWidth" should "error if the width is known" in { - intercept[TestFailedException] { - assertInferredWidth(8) { - Wire(UInt(8.W)) - } - } - } - - it should "error if the expected width is wrong" in { - a[TestFailedException] shouldBe thrownBy { - assertInferredWidth(8) { - val w = Wire(UInt()) - w := 2.U(2.W) - w - } - } - } - - it should "pass if the width is correct" in { - assertInferredWidth(4) { - val w = Wire(UInt()) - w := 2.U(4.W) - w - } - } -} |
