From e420f99d87ece9f56504b3afc2e37d40b6e8c7b1 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Sun, 6 Sep 2020 12:33:57 -0700 Subject: Add --pretty:no-expr-inlining to prevent expression inlining (#1869) Also rename --Wno-scala-version-warning to --warn:no-scala-version-deprecation and adopt naming convention where resulting annotation matches the CLI option--- .../firrtlTests/transforms/CombineCatsSpec.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/test/scala/firrtlTests/transforms') diff --git a/src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala b/src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala index a916eac5..cd0907dc 100644 --- a/src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala +++ b/src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala @@ -5,6 +5,7 @@ package firrtlTests.transforms import firrtl.PrimOps._ import firrtl._ import firrtl.ir.DoPrim +import firrtl.stage.PrettyNoExprInlining import firrtl.transforms.{CombineCats, MaxCatLenAnnotation} import firrtl.testutils.FirrtlFlatSpec import firrtl.testutils.FirrtlCheckers._ @@ -174,4 +175,22 @@ class CombineCatsSpec extends FirrtlFlatSpec { case DoPrim(Cat, Seq(_, DoPrim(Cat, Seq(_, DoPrim(Cat, _, _, _)), _, _)), _, _) => true } } + + "CombineCats" should s"respect --${PrettyNoExprInlining.longOption}" in { + val input = + """circuit test : + | module test : + | input in1 : UInt<1> + | input in2 : UInt<2> + | input in3 : UInt<3> + | input in4 : UInt<4> + | output out : UInt<10> + | + | node _T_1 = cat(in1, in2) + | node _T_2 = cat(_T_1, in3) + | out <= cat(_T_2, in4) + |""".stripMargin + val result = execute(input, transforms, PrettyNoExprInlining :: Nil) + result.circuit.serialize should be(parse(input).serialize) + } } -- cgit v1.2.3