diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/chiselTests/AutoClonetypeSpec.scala | 11 | ||||
| -rw-r--r-- | src/test/scala/chiselTests/AutoNestedCloneSpec.scala | 10 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/test/scala/chiselTests/AutoClonetypeSpec.scala b/src/test/scala/chiselTests/AutoClonetypeSpec.scala index 6924f8b8..520fbdc4 100644 --- a/src/test/scala/chiselTests/AutoClonetypeSpec.scala +++ b/src/test/scala/chiselTests/AutoClonetypeSpec.scala @@ -161,4 +161,15 @@ class AutoClonetypeSpec extends ChiselFlatSpec { } } } + "3.0 null compatibility" should "not need clonetype" in { + elaborate { new Module { + class InnerClassThing { + def createBundle = new Bundle { + val a = Output(UInt(8.W)) + } + } + val io = IO((new InnerClassThing).createBundle) + val a = WireInit(io) + } } + } } diff --git a/src/test/scala/chiselTests/AutoNestedCloneSpec.scala b/src/test/scala/chiselTests/AutoNestedCloneSpec.scala index 236de101..09cd687f 100644 --- a/src/test/scala/chiselTests/AutoNestedCloneSpec.scala +++ b/src/test/scala/chiselTests/AutoNestedCloneSpec.scala @@ -102,9 +102,9 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { } } - behavior of "anonymous doubly-nested inner bundle fails with clear error" - ( the[ChiselException] thrownBy { - elaborate { + // Test ignored because the compatibility null-inserting autoclonetype doesn't trip this + ignore should "fail on anonymous doubly-nested inner bundle with clear error" in { + intercept[ChiselException] { elaborate { class Outer(val w: Int) extends Module { class Middle(val w: Int) { def getIO = new Bundle { @@ -115,6 +115,6 @@ class AutoNestedCloneSpec extends ChiselFlatSpec with Matchers { val myWire = Wire((new Middle(w)).getIO) } new Outer(2) - } - }).getMessage should include("Unable to determine instance") + }}.getMessage should include("Unable to determine instance") + } } |
