diff options
| author | Jack Koenig | 2020-09-06 12:33:57 -0700 |
|---|---|---|
| committer | GitHub | 2020-09-06 12:33:57 -0700 |
| commit | e420f99d87ece9f56504b3afc2e37d40b6e8c7b1 (patch) | |
| tree | b5b0bd58912cdc28dc7d7abe34cde812c6e1c755 /src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala | |
| parent | b6de1491af7ba88bb778aaeeba369b6b87151f9e (diff) | |
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
Diffstat (limited to 'src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala')
| -rw-r--r-- | src/test/scala/firrtlTests/transforms/CombineCatsSpec.scala | 19 |
1 files changed, 19 insertions, 0 deletions
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) + } } |
