summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/scala/chiselTests/CompatibilitySpec.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/CompatibilitySpec.scala b/src/test/scala/chiselTests/CompatibilitySpec.scala
index 24149cf3..eece45e2 100644
--- a/src/test/scala/chiselTests/CompatibilitySpec.scala
+++ b/src/test/scala/chiselTests/CompatibilitySpec.scala
@@ -338,4 +338,24 @@ class CompatibiltySpec extends ChiselFlatSpec with GeneratorDrivenPropertyChecks
})
}
// scalastyle:on line.size.limit
+
+ behavior of "BitPat"
+
+ it should "support old operators" in {
+ class Foo extends Module {
+ val io = IO(new Bundle{})
+
+ info("Deprecated method DC hasn't been removed")
+ val bp = BitPat.DC(4)
+
+ info("BitPat != UInt is a Bool")
+ (bp != UInt(4)) shouldBe a [Bool]
+
+ /* This test does not work, but I'm not sure it's supposed to? It does *not* work on chisel3. */
+ // info("UInt != BitPat is a Bool")
+ // (UInt(4) != bp) shouldBe a [Bool]
+ }
+
+ elaborate(new Foo)
+ }
}