From 1e497ce39fd161c681ee64c0a4a882859eb8850b Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Wed, 10 Jun 2020 12:47:44 -0700 Subject: Build ArrayBuffers in Block.mapStmt (#1669) * Build ArrayBuffers in Block.mapStmt * Have empty Block serialize as "skip" The FIRRTL parser requires at least one indented line in each module. Sometimes tests emit and parse modules with no contents; this ensures there's always at least a "skip" in empty modules. Also fix tests that expected certain skips * Use var List as stack in Block.mapStmt impl This replaces Iterator concatenation. In Scala 2.11, RHS recursion on Iterators is not stack safe. This seems to have been fixed in 2.12 by Scala PR 5033. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>--- src/test/scala/firrtlTests/transforms/TopWiringTest.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/test/scala/firrtlTests/transforms') diff --git a/src/test/scala/firrtlTests/transforms/TopWiringTest.scala b/src/test/scala/firrtlTests/transforms/TopWiringTest.scala index e26b0445..0ac12ef8 100644 --- a/src/test/scala/firrtlTests/transforms/TopWiringTest.scala +++ b/src/test/scala/firrtlTests/transforms/TopWiringTest.scala @@ -618,7 +618,8 @@ class TopWiringTests extends MiddleTransformSpec with TopWiringTestsCommon { "--info-mode", "ignore" ) firrtl.Driver.execute(args) match { - case FirrtlExecutionSuccess(_, emitted) => parse(emitted) should be (parse(input)) + case FirrtlExecutionSuccess(_, emitted) => + parse(emitted).serialize should be (parse(input).serialize) case _ => fail } } -- cgit v1.2.3