aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/ConstantPropagationTests.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ConstantPropagationTests.scala b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
index 653653d6..efe85e48 100644
--- a/src/test/scala/firrtlTests/ConstantPropagationTests.scala
+++ b/src/test/scala/firrtlTests/ConstantPropagationTests.scala
@@ -1651,4 +1651,14 @@ class ConstantPropagationEquivalenceSpec extends FirrtlFlatSpec {
|""".stripMargin
firrtlEquivalenceTest(input, transforms)
}
+
+ "propagation of signed expressions" should "have the correct signs" in {
+ val input =
+ s"""circuit SignTester :
+ | module SignTester :
+ | output ref : SInt<3>
+ | ref <= mux(UInt<1>("h0"), SInt<3>("h0"), neg(UInt<2>("h3")))
+ |""".stripMargin
+ firrtlEquivalenceTest(input, transforms)
+ }
}