From 21ccf68fc0f0a3ff5a990ac9215a20f20807f4ed Mon Sep 17 00:00:00 2001 From: Kevin Laeufer Date: Mon, 10 Aug 2020 10:58:50 -0700 Subject: scalatest: upgrade to 3.2.1 (#1831) * scalatest: replace deprecated FlatSpec and add new Matchers import * scalatest: 3.1.2 -> 3.2.1--- src/test/scala/firrtlTests/LoweringCompilersSpec.scala | 5 +++-- src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala | 5 +++-- src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala | 5 +++-- src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/test/scala/firrtlTests/LoweringCompilersSpec.scala b/src/test/scala/firrtlTests/LoweringCompilersSpec.scala index 024f86a7..f19d52ae 100644 --- a/src/test/scala/firrtlTests/LoweringCompilersSpec.scala +++ b/src/test/scala/firrtlTests/LoweringCompilersSpec.scala @@ -2,7 +2,8 @@ package firrtlTests -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should._ import firrtl._ import firrtl.options.Dependency @@ -31,7 +32,7 @@ object Transforms { class LowToLow extends IdentityTransformDiff(L, L) } -class LoweringCompilersSpec extends FlatSpec with Matchers { +class LoweringCompilersSpec extends AnyFlatSpec with Matchers { def legacyTransforms(a: CoreTransform): Seq[Transform] = a match { case _: ChirrtlToHighFirrtl => Seq( diff --git a/src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala b/src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala index d1bd1fb2..2c817c23 100644 --- a/src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala +++ b/src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala @@ -7,7 +7,8 @@ import firrtl.annotations.{JsonProtocol, NoTargetAnnotation} import firrtl.ir._ import firrtl.options.Dependency import _root_.logger.{Logger, LogLevel, LogLevelAnnotation} -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should._ case class AnAnnotation( info: Info, @@ -30,7 +31,7 @@ class AnnoInjector extends Transform with DependencyAPIMigration { } } -class JsonProtocolSpec extends FlatSpec with Matchers { +class JsonProtocolSpec extends AnyFlatSpec with Matchers { "JsonProtocol" should "serialize and deserialize FIRRTL types" in { val circuit = diff --git a/src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala b/src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala index cc486c99..ccf930ba 100644 --- a/src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala +++ b/src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala @@ -6,9 +6,10 @@ import firrtl._ import firrtl.annotations.{Annotation, CircuitTarget, CompleteTarget, DeletedAnnotation} import firrtl.annotations.transforms.{DupedResult, ResolvePaths} import firrtl.transforms.DedupedResult -import org.scalatest.{FlatSpec, Matchers} +import org.scalatest.flatspec.AnyFlatSpec +import org.scalatest.matchers.should._ -class MorphismSpec extends FlatSpec with Matchers { +class MorphismSpec extends AnyFlatSpec with Matchers { object AnAnnotation { def apply(target: CompleteTarget) = new AnAnnotation(Some(target)) diff --git a/src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala b/src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala index de638374..bfc72f49 100644 --- a/src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala +++ b/src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala @@ -7,10 +7,10 @@ import firrtl.options.Dependency import firrtl.stage.TransformManager import firrtl.{InstanceKind, MemKind, NodeKind, PortKind, RegKind, WireKind} import firrtl.{CircuitState, SinkFlow, SourceFlow, ir, passes} -import org.scalatest._ +import org.scalatest.flatspec.AnyFlatSpec /** Tests the combined results of ResolveKinds, InferTypes and ResolveFlows */ -class InferTypesFlowsAndKindsSpec extends FlatSpec { +class InferTypesFlowsAndKindsSpec extends AnyFlatSpec { private val deps = Seq( Dependency(passes.ResolveKinds), Dependency(passes.InferTypes), -- cgit v1.2.3