Move to scalatest 3.2

Requires updating to AnyFlatSpec where used
And different import for Matchers
This commit is contained in:
chick
2021-02-03 21:03:22 -08:00
parent caa1467d87
commit d9d9d0fbb5
4 changed files with 11 additions and 11 deletions

View File

@@ -13,9 +13,8 @@ lazy val commonSettings = Seq(
libraryDependencies ++= Seq("chisel3","chisel-iotesters").map {
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep))
},
libraryDependencies in Test ++= Seq(
"org.scalatest" %% "scalatest" % "2.2.5" % "test",
"org.scalacheck" %% "scalacheck" % "1.12.4" % "test"
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
),
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
@@ -31,9 +30,6 @@ lazy val macros = (project in file("macros"))
.dependsOn(mdf)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"edu.berkeley.cs" %% "firrtl-interpreter" % "1.4.+" % Test
),
mainClass := Some("barstools.macros.MacroCompiler")
)
.enablePlugins(sbtassembly.AssemblyPlugin)

View File

@@ -6,10 +6,12 @@ import firrtl.Parser.parse
import firrtl.ir.{Circuit, NoInfo}
import firrtl.passes.RemoveEmpty
import mdf.macrolib.SRAMMacro
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import java.io.File
abstract class MacroCompilerSpec extends org.scalatest.FlatSpec with org.scalatest.Matchers {
abstract class MacroCompilerSpec extends AnyFlatSpec with Matchers {
import scala.language.implicitConversions
implicit def String2SomeString(i: String): Option[String] = Some(i)
val testDir: String = "test_run_dir/macros"

View File

@@ -5,7 +5,8 @@ package barstools.tapeout.transforms
import chisel3._
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
import firrtl.{EmittedFirrtlCircuitAnnotation, EmittedFirrtlModuleAnnotation}
import org.scalatest.{FreeSpec, Matchers}
import org.scalatest.freespec.AnyFreeSpec
import org.scalatest.matchers.should.Matchers
class ExampleModuleNeedsResetInverted extends Module with ResetInverter {
val io = IO(new Bundle {
@@ -19,7 +20,7 @@ class ExampleModuleNeedsResetInverted extends Module with ResetInverter {
invert(this)
}
class ResetNSpec extends FreeSpec with Matchers {
class ResetNSpec extends AnyFreeSpec with Matchers {
"Inverting reset needs to be done throughout module in Chirrtl" in {
val chirrtl = (new ChiselStage).emitChirrtl(new ExampleModuleNeedsResetInverted)
chirrtl should include("input reset :")

View File

@@ -6,9 +6,10 @@ import chisel3._
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
import firrtl.{EmittedFirrtlCircuitAnnotation, EmittedFirrtlModuleAnnotation, FileUtils}
import logger.Logger
import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
class RetimeSpec extends FlatSpec with Matchers {
class RetimeSpec extends AnyFlatSpec with Matchers {
def normalized(s: String): String = {
require(!s.contains("\n"))
s.replaceAll("\\s+", " ").trim