aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala
diff options
context:
space:
mode:
authorchick2020-08-14 19:47:53 -0700
committerJack Koenig2020-08-14 19:47:53 -0700
commit6fc742bfaf5ee508a34189400a1a7dbffe3f1cac (patch)
tree2ed103ee80b0fba613c88a66af854ae9952610ce /src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala
parentb516293f703c4de86397862fee1897aded2ae140 (diff)
All of src/ formatted with scalafmt
Diffstat (limited to 'src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala')
-rw-r--r--src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala b/src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala
index 715714dd..48eb24c1 100644
--- a/src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala
+++ b/src/test/scala/firrtlTests/ZeroLengthVecsSpec.scala
@@ -7,18 +7,14 @@ import firrtl.passes._
import firrtl.testutils.FirrtlFlatSpec
class ZeroLengthVecsSpec extends FirrtlFlatSpec {
- val transforms = Seq(
- ToWorkingIR,
- ResolveKinds,
- InferTypes,
- ResolveFlows,
- new InferWidths,
- ZeroLengthVecs,
- CheckTypes)
+ val transforms = Seq(ToWorkingIR, ResolveKinds, InferTypes, ResolveFlows, new InferWidths, ZeroLengthVecs, CheckTypes)
protected def exec(input: String) = {
- transforms.foldLeft(CircuitState(parse(input), UnknownForm)) {
- (c: CircuitState, t: Transform) => t.runTransform(c)
- }.circuit.serialize
+ transforms
+ .foldLeft(CircuitState(parse(input), UnknownForm)) { (c: CircuitState, t: Transform) =>
+ t.runTransform(c)
+ }
+ .circuit
+ .serialize
}
"ZeroLengthVecs" should "drop subaccesses to zero-length vectors" in {
@@ -42,7 +38,7 @@ class ZeroLengthVecsSpec extends FirrtlFlatSpec {
| skip
| o <= validif(UInt<1>(0), UInt<8>(0))
|""".stripMargin
- (parse(exec(input))) should be (parse(check))
+ (parse(exec(input))) should be(parse(check))
}
"ZeroLengthVecs" should "handle intervals correctly" in {
@@ -62,7 +58,7 @@ class ZeroLengthVecsSpec extends FirrtlFlatSpec {
| output o : Interval[3,4].0
| o <= validif(UInt<1>(0), clip(asInterval(SInt<1>(0), 0, 0, 0), i[sel]))
|""".stripMargin
- (parse(exec(input))) should be (parse(check))
+ (parse(exec(input))) should be(parse(check))
}
}