diff options
| author | Kevin Laeufer | 2020-08-10 10:58:50 -0700 |
|---|---|---|
| committer | GitHub | 2020-08-10 10:58:50 -0700 |
| commit | 21ccf68fc0f0a3ff5a990ac9215a20f20807f4ed (patch) | |
| tree | afa23fa731deefa85168153416a2e1cc5da12727 | |
| parent | a6d53c9df25dba7da9d923faff9bf3c32f71b2d9 (diff) | |
scalatest: upgrade to 3.2.1 (#1831)
* scalatest: replace deprecated FlatSpec and add new Matchers import
* scalatest: 3.1.2 -> 3.2.1
| -rw-r--r-- | build.sbt | 2 | ||||
| -rw-r--r-- | build.sc | 2 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/LoweringCompilersSpec.scala | 5 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/annotationTests/JsonProtocolSpec.scala | 5 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/annotationTests/MorphismSpec.scala | 5 | ||||
| -rw-r--r-- | src/test/scala/firrtlTests/passes/InferTypesFlowsAndKindsSpec.scala | 4 |
6 files changed, 13 insertions, 10 deletions
@@ -35,7 +35,7 @@ lazy val commonSettings = Seq( javacOptions ++= javacOptionsVersion(scalaVersion.value), libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value, - "org.scalatest" %% "scalatest" % "3.1.2" % "test", + "org.scalatest" %% "scalatest" % "3.2.1" % "test", "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" % "test", "com.github.scopt" %% "scopt" % "3.7.1", "net.jcazevedo" %% "moultingyaml" % "0.4.2", @@ -59,7 +59,7 @@ class firrtlCrossModule(crossVersion: String) extends ScalaModule with SbtModule } def ivyDeps = Agg( - ivy"org.scalatest::scalatest:3.1.2", + ivy"org.scalatest::scalatest:3.2.1", ivy"org.scalatestplus::scalacheck-1-14:3.1.1.1" ) ++ ivyCrossDeps 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), |
