Move to scalatest 3.2
Requires updating to AnyFlatSpec where used And different import for Matchers
This commit is contained in:
@@ -13,9 +13,8 @@ lazy val commonSettings = Seq(
|
|||||||
libraryDependencies ++= Seq("chisel3","chisel-iotesters").map {
|
libraryDependencies ++= Seq("chisel3","chisel-iotesters").map {
|
||||||
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep))
|
dep: String => "edu.berkeley.cs" %% dep % sys.props.getOrElse(dep + "Version", defaultVersions(dep))
|
||||||
},
|
},
|
||||||
libraryDependencies in Test ++= Seq(
|
libraryDependencies ++= Seq(
|
||||||
"org.scalatest" %% "scalatest" % "2.2.5" % "test",
|
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
|
||||||
"org.scalacheck" %% "scalacheck" % "1.12.4" % "test"
|
|
||||||
),
|
),
|
||||||
resolvers ++= Seq(
|
resolvers ++= Seq(
|
||||||
Resolver.sonatypeRepo("snapshots"),
|
Resolver.sonatypeRepo("snapshots"),
|
||||||
@@ -31,9 +30,6 @@ lazy val macros = (project in file("macros"))
|
|||||||
.dependsOn(mdf)
|
.dependsOn(mdf)
|
||||||
.settings(commonSettings)
|
.settings(commonSettings)
|
||||||
.settings(
|
.settings(
|
||||||
libraryDependencies ++= Seq(
|
|
||||||
"edu.berkeley.cs" %% "firrtl-interpreter" % "1.4.+" % Test
|
|
||||||
),
|
|
||||||
mainClass := Some("barstools.macros.MacroCompiler")
|
mainClass := Some("barstools.macros.MacroCompiler")
|
||||||
)
|
)
|
||||||
.enablePlugins(sbtassembly.AssemblyPlugin)
|
.enablePlugins(sbtassembly.AssemblyPlugin)
|
||||||
|
|||||||
@@ -6,10 +6,12 @@ import firrtl.Parser.parse
|
|||||||
import firrtl.ir.{Circuit, NoInfo}
|
import firrtl.ir.{Circuit, NoInfo}
|
||||||
import firrtl.passes.RemoveEmpty
|
import firrtl.passes.RemoveEmpty
|
||||||
import mdf.macrolib.SRAMMacro
|
import mdf.macrolib.SRAMMacro
|
||||||
|
import org.scalatest.flatspec.AnyFlatSpec
|
||||||
|
import org.scalatest.matchers.should.Matchers
|
||||||
|
|
||||||
import java.io.File
|
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
|
import scala.language.implicitConversions
|
||||||
implicit def String2SomeString(i: String): Option[String] = Some(i)
|
implicit def String2SomeString(i: String): Option[String] = Some(i)
|
||||||
val testDir: String = "test_run_dir/macros"
|
val testDir: String = "test_run_dir/macros"
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ package barstools.tapeout.transforms
|
|||||||
import chisel3._
|
import chisel3._
|
||||||
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
|
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
|
||||||
import firrtl.{EmittedFirrtlCircuitAnnotation, EmittedFirrtlModuleAnnotation}
|
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 {
|
class ExampleModuleNeedsResetInverted extends Module with ResetInverter {
|
||||||
val io = IO(new Bundle {
|
val io = IO(new Bundle {
|
||||||
@@ -19,7 +20,7 @@ class ExampleModuleNeedsResetInverted extends Module with ResetInverter {
|
|||||||
invert(this)
|
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 {
|
"Inverting reset needs to be done throughout module in Chirrtl" in {
|
||||||
val chirrtl = (new ChiselStage).emitChirrtl(new ExampleModuleNeedsResetInverted)
|
val chirrtl = (new ChiselStage).emitChirrtl(new ExampleModuleNeedsResetInverted)
|
||||||
chirrtl should include("input reset :")
|
chirrtl should include("input reset :")
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ import chisel3._
|
|||||||
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
|
import chisel3.stage.{ChiselGeneratorAnnotation, ChiselStage}
|
||||||
import firrtl.{EmittedFirrtlCircuitAnnotation, EmittedFirrtlModuleAnnotation, FileUtils}
|
import firrtl.{EmittedFirrtlCircuitAnnotation, EmittedFirrtlModuleAnnotation, FileUtils}
|
||||||
import logger.Logger
|
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 = {
|
def normalized(s: String): String = {
|
||||||
require(!s.contains("\n"))
|
require(!s.contains("\n"))
|
||||||
s.replaceAll("\\s+", " ").trim
|
s.replaceAll("\\s+", " ").trim
|
||||||
|
|||||||
Reference in New Issue
Block a user