From 22434659d8ac8a7855c7d7c00c7adf71e8e1099b Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Thu, 12 Sep 2019 12:03:40 -0400 Subject: Add BoringUtils.bore test for internal boring Signed-off-by: Schuyler Eldridge --- src/test/scala/chiselTests/BoringUtilsSpec.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/test/scala/chiselTests/BoringUtilsSpec.scala b/src/test/scala/chiselTests/BoringUtilsSpec.scala index 856f6b91..755ba60b 100644 --- a/src/test/scala/chiselTests/BoringUtilsSpec.scala +++ b/src/test/scala/chiselTests/BoringUtilsSpec.scala @@ -106,4 +106,21 @@ class BoringUtilsSpec extends ChiselFlatSpec with ChiselRunners { .getMessage should startWith ("Unable to determine source mapping for sink") } + class InternalBore extends RawModule { + val in = IO(Input(Bool())) + val out = IO(Output(Bool())) + out := false.B + BoringUtils.bore(in, Seq(out)) + } + + class InternalBoreTester extends ShouldntAssertTester { + val dut = Module(new InternalBore) + dut.in := true.B + chisel3.assert(dut.out === true.B) + } + + it should "work for an internal (same module) BoringUtils.bore" in { + runTester(new InternalBoreTester) should be (true) + } + } -- cgit v1.2.3