summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/BoringUtilsSpec.scala
diff options
context:
space:
mode:
authorChick Markley2020-06-30 09:39:10 -0700
committerGitHub2020-06-30 09:39:10 -0700
commit61f4abd4f8939b75ccceab5d86362c30babd1101 (patch)
treeb13d75011859e3adf806f3747c542daa9662fba1 /src/test/scala/chiselTests/BoringUtilsSpec.scala
parenta1edc8f4cd525c8475e847ff7ddd9cb8fc1d3c51 (diff)
parent3694b092830ac0a8d1e5a6dfe9a65d88420c1962 (diff)
Merge pull request #1483 from freechipsproject/add-treadle-backend-for-tests
This adds a mechanism for the unittests to be run with the TreadleBac…
Diffstat (limited to 'src/test/scala/chiselTests/BoringUtilsSpec.scala')
-rw-r--r--src/test/scala/chiselTests/BoringUtilsSpec.scala12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/BoringUtilsSpec.scala b/src/test/scala/chiselTests/BoringUtilsSpec.scala
index 997466c0..93b9a036 100644
--- a/src/test/scala/chiselTests/BoringUtilsSpec.scala
+++ b/src/test/scala/chiselTests/BoringUtilsSpec.scala
@@ -4,7 +4,7 @@ package chiselTests
import chisel3._
import chisel3.util.Counter
-import chisel3.testers.BasicTester
+import chisel3.testers._
import chisel3.experimental.{BaseModule, ChiselAnnotation, RunFirrtlTransform}
import chisel3.util.experimental.BoringUtils
@@ -49,7 +49,8 @@ class BoringUtilsSpec extends ChiselFlatSpec with ChiselRunners {
behavior of "BoringUtils.{addSink, addSource}"
it should "connect two wires within a module" in {
- runTester(new ShouldntAssertTester { val dut = Module(new BoringInverter) } ) should be (true)
+ runTester(new ShouldntAssertTester { val dut = Module(new BoringInverter) },
+ annotations = TesterDriver.verilatorOnly) should be (true)
}
trait WireX { this: BaseModule =>
@@ -103,11 +104,12 @@ class BoringUtilsSpec extends ChiselFlatSpec with ChiselRunners {
behavior of "BoringUtils.bore"
it should "connect across modules using BoringUtils.bore" in {
- runTester(new TopTester) should be (true)
+ runTester(new TopTester, annotations = TesterDriver.verilatorOnly) should be (true)
}
it should "throw an exception if NoDedupAnnotations are removed" in {
- intercept[WiringException] { runTester(new TopTester with FailViaDedup) }
+ intercept[WiringException] { runTester(new TopTester with FailViaDedup,
+ annotations = Seq(TesterDriver.VerilatorBackend)) }
.getMessage should startWith ("Unable to determine source mapping for sink")
}
@@ -125,7 +127,7 @@ class BoringUtilsSpec extends ChiselFlatSpec with ChiselRunners {
}
it should "work for an internal (same module) BoringUtils.bore" in {
- runTester(new InternalBoreTester) should be (true)
+ runTester(new InternalBoreTester, annotations = TesterDriver.verilatorOnly) should be (true)
}
}