diff options
| author | Kevin Laeufer | 2020-07-28 10:10:43 -0700 |
|---|---|---|
| committer | Kevin Laeufer | 2020-07-29 15:26:30 -0700 |
| commit | 093cb4993f37fccb55396abeb1a61a528f0eaa2a (patch) | |
| tree | 26488bdf8fd33e0b8693ce99c8cd119227300b76 /src/test | |
| parent | 8b66b53591703d6cded44419726b18e80d0e6bd6 (diff) | |
[2.13] toSeq, Unit -> (), and postfix fixes
Diffstat (limited to 'src/test')
5 files changed, 7 insertions, 7 deletions
diff --git a/src/test/scala/firrtlTests/MultiThreadingSpec.scala b/src/test/scala/firrtlTests/MultiThreadingSpec.scala index e41e6835..c7b18624 100644 --- a/src/test/scala/firrtlTests/MultiThreadingSpec.scala +++ b/src/test/scala/firrtlTests/MultiThreadingSpec.scala @@ -30,7 +30,7 @@ class MultiThreadingSpec extends FirrtlPropSpec { // Begin the actual test - val inputStrings = FileUtils.getLinesResource(inputFilePath) + val inputStrings = FileUtils.getLinesResource(inputFilePath).toSeq import ExecutionContext.Implicits.global try { // Use try-catch because error can manifest in many ways diff --git a/src/test/scala/firrtlTests/ParserSpec.scala b/src/test/scala/firrtlTests/ParserSpec.scala index ba5cb889..3d377901 100644 --- a/src/test/scala/firrtlTests/ParserSpec.scala +++ b/src/test/scala/firrtlTests/ParserSpec.scala @@ -21,7 +21,7 @@ class ParserSpec extends FirrtlFlatSpec { "readwriter" -> "c" ) def fieldsToSeq(m: Map[String, String]): Seq[String] = - m map { case (k,v) => s" ${k} => ${v}" } toSeq + m.map { case (k,v) => s" ${k} => ${v}" }.toSeq } private object RegTests { diff --git a/src/test/scala/firrtlTests/RemoveWiresSpec.scala b/src/test/scala/firrtlTests/RemoveWiresSpec.scala index e6b60059..df3ceef6 100644 --- a/src/test/scala/firrtlTests/RemoveWiresSpec.scala +++ b/src/test/scala/firrtlTests/RemoveWiresSpec.scala @@ -37,7 +37,7 @@ class RemoveWiresSpec extends FirrtlFlatSpec { circuit.modules.head match { case Module(_,_,_, body) => onStmt(body) } - (nodes, wires) + (nodes.toSeq, wires.toSeq) } def orderedNames(circuit: Circuit): Seq[String] = { @@ -55,7 +55,7 @@ class RemoveWiresSpec extends FirrtlFlatSpec { circuit.modules.head match { case Module(_,_,_, body) => onStmt(body) } - names + names.toSeq } "Remove Wires" should "turn wires and their single connect into nodes" in { diff --git a/src/test/scala/firrtlTests/options/OptionParserSpec.scala b/src/test/scala/firrtlTests/options/OptionParserSpec.scala index b8efbdb6..e93c9b2c 100644 --- a/src/test/scala/firrtlTests/options/OptionParserSpec.scala +++ b/src/test/scala/firrtlTests/options/OptionParserSpec.scala @@ -40,7 +40,7 @@ class OptionParserSpec extends AnyFlatSpec with Matchers with firrtl.testutils.U catchStatus { parser.terminate(Left("some message")) } should be (Left(1)) info("exit status of 0 for success") - catchStatus { parser.terminate(Right(Unit)) } should be (Left(0)) + catchStatus { parser.terminate(Right(())) } should be (Left(0)) } it should "print to stderr on an invalid option" in new WithIntParser { @@ -56,7 +56,7 @@ class OptionParserSpec extends AnyFlatSpec with Matchers with firrtl.testutils.U catchStatus { parser.terminate(Left("some message")) } should be (Right(())) info("no exit for success") - catchStatus { parser.terminate(Right(Unit)) } should be (Right(())) + catchStatus { parser.terminate(Right(())) } should be (Right(())) } behavior of "An OptionParser with DuplicateHandling mixed in" diff --git a/src/test/scala/firrtlTests/options/PhaseManagerSpec.scala b/src/test/scala/firrtlTests/options/PhaseManagerSpec.scala index d8422cb9..108f3730 100644 --- a/src/test/scala/firrtlTests/options/PhaseManagerSpec.scala +++ b/src/test/scala/firrtlTests/options/PhaseManagerSpec.scala @@ -392,7 +392,7 @@ class PhaseManagerSpec extends AnyFlatSpec with Matchers { /** Convert a Graphviz file to PNG using */ def maybeToPng(f: File): Unit = try { - s"dot -Tpng -O ${f}" ! + s"dot -Tpng -O ${f}".! } catch { case _: java.io.IOException => } |
