Skip to content

Commit

Permalink
Port all minitest tests to munit
Browse files Browse the repository at this point in the history
Closes #140
  • Loading branch information
noelwelsh committed Nov 30, 2023
1 parent c8f4673 commit 340d88e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 27 deletions.
7 changes: 1 addition & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ lazy val css = taskKey[Unit]("Build the CSS")
lazy val commonSettings = Seq(
libraryDependencies ++= Seq(
Dependencies.munit.value,
Dependencies.munitScalaCheck.value,
Dependencies.miniTest.value,
Dependencies.miniTestLaws.value
Dependencies.munitScalaCheck.value
),
testFrameworks += new TestFramework("minitest.runner.Framework"),
// scalacOptions ++= Seq("-release", "8"),
// javacOptions ++= Seq("-source", "8", "-target", "8"),
startYear := Some(2015),
licenses := List(
"Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")
Expand Down
6 changes: 3 additions & 3 deletions core/shared/src/test/scala/doodle/core/ColorSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package doodle
package core

import doodle.syntax.all._
import minitest._
import doodle.syntax.all.*
import munit.FunSuite

object ColorSuite extends SimpleTestSuite {
class ColorSuite extends FunSuite {
test("toRGBA should convert to expected RGBA color") {
val blueHSLA = Color.hsl(240.degrees, 0.5, 0.5).toRGBA
val blueRGBA = Color.rgb(64.uByte, 64.uByte, 191.uByte)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ package java2d

import cats.effect.unsafe.implicits.global
import doodle.core.Base64
import doodle.core.format._
import doodle.syntax.all._
import minitest._
import doodle.core.format.*
import doodle.syntax.all.*
import munit.FunSuite

object Base64Spec extends SimpleTestSuite {
class Base64Suite extends FunSuite {
def base64Distance[A <: Format](b1: Base64[A], b2: Base64[A]): Double = {
import java.util.{Base64 => JBase64}
val d1 = JBase64.getDecoder().decode(b1.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ package java2d

import cats.effect.unsafe.implicits.global
import doodle.algebra.ToPicture
import doodle.core.format._
import doodle.core.format.*
import doodle.core.{Base64 => B64}
import doodle.effect._
import doodle.syntax.all._
import minitest._
import doodle.effect.*
import doodle.syntax.all.*
import munit.FunSuite

object ToPictureSpec extends SimpleTestSuite {
class ToPictureSuite extends FunSuite {
def base64Distance[A <: Format](b1: B64[A], b2: B64[A]): Double = {
import java.util.{Base64 => JBase64}
val d1 = JBase64.getDecoder().decode(b1.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ package doodle
package java2d

import cats.effect.unsafe.implicits.global
import doodle.core.format._
import doodle.syntax.all._
import minitest._
import doodle.core.format.*
import doodle.syntax.all.*
import munit.FunSuite

import java.io.File

object WriterSpec extends SimpleTestSuite {
class WriterSuite extends FunSuite {
val image = circle[Algebra](20.0)

test("write should work with png") {
Expand Down
5 changes: 0 additions & 5 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ object Dependencies {

val batikVersion = "1.17"

val miniTestVersion = "2.9.6"
val scalaCheckVersion = "1.15.4"
val munitVersion = "0.7.29"
val munitCatsEffectVersion = "1.0.7"
Expand All @@ -30,10 +29,6 @@ object Dependencies {
val batik =
Def.setting("org.apache.xmlgraphics" % "batik-transcoder" % batikVersion)

val miniTest =
Def.setting("io.monix" %%% "minitest" % miniTestVersion % "test")
val miniTestLaws =
Def.setting("io.monix" %%% "minitest-laws" % miniTestVersion % "test")
val munit = Def.setting("org.scalameta" %%% "munit" % munitVersion % "test")
val munitScalaCheck =
Def.setting("org.scalameta" %%% "munit-scalacheck" % munitVersion % "test")
Expand Down

0 comments on commit 340d88e

Please sign in to comment.