Skip to content

Commit 48f972f

Browse files
committed
move to ScalaTest 3.2 (and narrower dependencies)
1 parent 6d955cd commit 48f972f

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

build.sbt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ lazy val swing = project.in(file("."))
77
scalaModuleMimaPreviousVersion := Some("2.1.0"),
88
// set the prompt (for this build) to include the project id.
99
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " },
10-
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.8" % Test,
10+
libraryDependencies ++= Seq(
11+
"org.scalatest" %% "scalatest-flatspec" % "3.2.0" % Test,
12+
"org.scalatest" %% "scalatest-shouldmatchers" % "3.2.0" % Test,
13+
),
1114
// Adds a `src/main/scala-2.13+` source directory for Scala 2.13 and newer
1215
// and a `src/main/scala-2.13-` source directory for Scala version older than 2.13
1316
unmanagedSourceDirectories in Compile += {

src/test/scala/scala/swing/Issue73.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package scala.swing
22

3-
import org.scalatest.{FlatSpec, Matchers}
3+
import org.scalatest.flatspec.AnyFlatSpec
4+
import org.scalatest.matchers.should.Matchers
45

5-
class Issue73 extends FlatSpec with Matchers {
6+
class Issue73 extends AnyFlatSpec with Matchers {
67
"Enumerations" should "not contain duplicate ids" in {
78
// the initializers of any of these will through an
89
// assertion error if an enumeration `Value` id is used twice.

src/test/scala/scala/swing/Issue97.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ package scala.swing
22

33
import java.util.concurrent.TimeUnit
44

5-
import org.scalatest.{FlatSpec, Matchers}
5+
import org.scalatest.flatspec.AnyFlatSpec
6+
import org.scalatest.matchers.should.Matchers
67

78
import scala.concurrent.duration.Duration
89
import scala.concurrent.{Await, Future, Promise}
910
import scala.swing.event.{UIElementHidden, UIElementMoved, UIElementResized, UIElementShown}
1011
import scala.util.control.NonFatal
1112

1213
// Note: `AsyncFlatSpec` has issues with swallowing errors and returning early.
13-
class Issue97 extends FlatSpec with Matchers {
14+
class Issue97 extends AnyFlatSpec with Matchers {
1415
case class Count(shown: Int = 0, hidden: Int = 0, moved: Int = 0, resized: Int = 0)
1516

1617
def countEvents(): Future[Count] = {

0 commit comments

Comments
 (0)