diff options
| author | Jack Koenig | 2022-09-22 16:00:35 -0700 |
|---|---|---|
| committer | GitHub | 2022-09-22 16:00:35 -0700 |
| commit | 79c17c8448c8c15a245c3435d9c97c128738121e (patch) | |
| tree | 1ce2795db8a4bb4a5674337d223c3d2564879544 /src/test/scala/firrtlTests/SerializerSpec.scala | |
| parent | c8745fca352c79f886a1661d4985adc79e57c36d (diff) | |
Fix serialization of whens with empty blocks (#2560)
Also get rid of whitespace-only lines that were emitted after every when
block.
Diffstat (limited to 'src/test/scala/firrtlTests/SerializerSpec.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/SerializerSpec.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/SerializerSpec.scala b/src/test/scala/firrtlTests/SerializerSpec.scala index 797a6045..9a984d60 100644 --- a/src/test/scala/firrtlTests/SerializerSpec.scala +++ b/src/test/scala/firrtlTests/SerializerSpec.scala @@ -116,4 +116,9 @@ class SerializerSpec extends AnyFlatSpec with Matchers { serialized should be(childModuleTabbed) } + it should "emit whens with empty Blocks correctly" in { + val when = Conditionally(NoInfo, Reference("cond"), Block(Seq()), EmptyStmt) + val serialized = Serializer.serialize(when, 1) + serialized should be(" when cond :\n skip\n") + } } |
