From 009b0e127664b2835f213d811be889149229bfa2 Mon Sep 17 00:00:00 2001 From: "E.G" <146701565+GlobalStar117@users.noreply.github.com> Date: Fri, 16 Jan 2026 07:01:57 +1100 Subject: [PATCH] [2.x] test: Migrate FileStampJsonSpec.scala to verify.BasicTestSuite (#8552) Co-authored-by: GlobalStar117 --- .../scala/sbt/internal/FileStampJsonSpec.scala | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/main/src/test/scala/sbt/internal/FileStampJsonSpec.scala b/main/src/test/scala/sbt/internal/FileStampJsonSpec.scala index 6e082cf23..14ee28e2b 100644 --- a/main/src/test/scala/sbt/internal/FileStampJsonSpec.scala +++ b/main/src/test/scala/sbt/internal/FileStampJsonSpec.scala @@ -10,14 +10,14 @@ package sbt.internal import java.nio.file.{ Path, Paths } -import org.scalatest.flatspec.AnyFlatSpec +import verify.BasicTestSuite import sbt.nio.FileStamp import sbt.nio.FileStamp.Formats import sjsonnew.JsonFormat import sjsonnew.support.scalajson.unsafe.Converter -class FileStampJsonSpec extends AnyFlatSpec { - "file hashes" should "be serializable" in { +object FileStampJsonSpec extends BasicTestSuite: + test("file hashes should be serializable"): val hashes = Seq( Paths.get("foo") -> FileStamp.hash("bar"), Paths.get("bar") -> FileStamp.hash("buzz") @@ -27,8 +27,8 @@ class FileStampJsonSpec extends AnyFlatSpec { val json = Converter.toJsonUnsafe(hashes) val deserialized = Converter.fromJsonUnsafe(json) assert(hashes == deserialized) - } - "file last modified times" should "be serializable" in { + + test("file last modified times should be serializable"): val lastModifiedTimes = Seq( Paths.get("foo") -> FileStamp.LastModified(1234), Paths.get("bar") -> FileStamp.LastModified(5678) @@ -38,8 +38,8 @@ class FileStampJsonSpec extends AnyFlatSpec { val json = Converter.toJsonUnsafe(lastModifiedTimes) val deserialized = Converter.fromJsonUnsafe(json) assert(lastModifiedTimes == deserialized) - } - "both" should "be serializable" in { + + test("both should be serializable"): val hashes = Seq( Paths.get("foo") -> FileStamp.hash("bar"), Paths.get("bar") -> FileStamp.hash("buzz") @@ -53,5 +53,4 @@ class FileStampJsonSpec extends AnyFlatSpec { val json = Converter.toJsonUnsafe(both) val deserialized = Converter.fromJsonUnsafe(json) assert(both == deserialized) - } -} +end FileStampJsonSpec