From 51e7ea067ec2d64ce57b55446263a8e40c87996c Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Tue, 19 Dec 2017 22:13:20 -0500 Subject: Make toNamed invert serialize (#709) Fixes #708--- src/test/scala/firrtlTests/AnnotationTests.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/scala/firrtlTests/AnnotationTests.scala b/src/test/scala/firrtlTests/AnnotationTests.scala index c8a90729..7b7e7839 100644 --- a/src/test/scala/firrtlTests/AnnotationTests.scala +++ b/src/test/scala/firrtlTests/AnnotationTests.scala @@ -158,7 +158,7 @@ class AnnotationTests extends AnnotationSpec with Matchers { | module Top : | input clk: Clock | input in: UInt<3> - | mem m: + | mem m: | data-type => {a: UInt<4>, b: UInt<4>[2]} | depth => 8 | write-latency => 1 @@ -496,4 +496,10 @@ class AnnotationTests extends AnnotationSpec with Matchers { resultAnno should not contain (anno("y", mod = "Child_1")) resultAnno should not contain (manno("Child_1")) } + + "AnnotationUtils.toNamed" should "invert Named.serialize" in { + val x = ComponentName("component", ModuleName("module", CircuitName("circuit"))) + val y = AnnotationUtils.toNamed(x.serialize) + require(x == y) + } } -- cgit v1.2.3