diff options
| author | Jack Koenig | 2018-07-10 19:03:53 -0700 |
|---|---|---|
| committer | GitHub | 2018-07-10 19:03:53 -0700 |
| commit | 17437907de4ad12eb3f8d0818a158eb6959591a3 (patch) | |
| tree | 6f4cef136baff0c4b76592bff744f9639a0c694e /src/test | |
| parent | 6b02d09eb412df275d00930ab0e167b07fa61862 (diff) | |
Fix bug in zero-width renaming (#845)
Previously, Vecs of Bundles that contained a zero-width element would
result in a ClassCastException
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/scala/firrtlTests/AnnotationTests.scala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/test/scala/firrtlTests/AnnotationTests.scala b/src/test/scala/firrtlTests/AnnotationTests.scala index 99e1ea2c..b2aeda77 100644 --- a/src/test/scala/firrtlTests/AnnotationTests.scala +++ b/src/test/scala/firrtlTests/AnnotationTests.scala @@ -430,10 +430,13 @@ abstract class AnnotationTests extends AnnotationSpec with Matchers { | output y : { foo : UInt<8>, bar : {}, fizz : UInt<8>[0], buzz : UInt<0> } | output a : {} | output b : UInt<8>[0] + | output c : { d : UInt<0>, e : UInt<8> }[2] + | c is invalid | y <= x |""".stripMargin val annos = Seq( - anno("x"), anno("y.bar"), anno("y.fizz"), anno("y.buzz"), anno("a"), anno("b") + anno("x"), anno("y.bar"), anno("y.fizz"), anno("y.buzz"), anno("a"), anno("b"), anno("c"), + anno("c[0].d"), anno("c[1].d") ) val result = compiler.compile(CircuitState(parse(input), ChirrtlForm, annos), Nil) val resultAnno = result.annotations.toSeq @@ -453,6 +456,13 @@ abstract class AnnotationTests extends AnnotationSpec with Matchers { resultAnno should not contain (anno("x_bar")) resultAnno should not contain (anno("x_fizz")) resultAnno should not contain (anno("x_buzz")) + resultAnno should not contain (anno("c")) + resultAnno should contain (anno("c_0_e")) + resultAnno should contain (anno("c_1_e")) + resultAnno should not contain (anno("c[0].d")) + resultAnno should not contain (anno("c[1].d")) + resultAnno should not contain (anno("c_0_d")) + resultAnno should not contain (anno("c_1_d")) } } |
