diff options
| author | Schuyler Eldridge | 2019-07-31 12:57:13 -0400 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-07-31 15:53:26 -0400 |
| commit | 09f7aa03e1e729ad9e6eb97ab08419d0b95c8703 (patch) | |
| tree | e27bf9ece697729e1922095ceec6ee5601b05aad /src/test/scala/chiselTests | |
| parent | 54a58ba872aa8ea75bbda03d49df70d59ac93422 (diff) | |
Add BitPat deprecated compatibility tests
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'src/test/scala/chiselTests')
| -rw-r--r-- | src/test/scala/chiselTests/CompatibilitySpec.scala | 20 |
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) + } } |
