File tree Expand file tree Collapse file tree 8 files changed +17
-26
lines changed
cats-tests/src/test/scala/com/olegpy/bm4
pcplod-tests/src/test/scala/com/olegpy/bm4
plugin-tests/src/test/scala/com/olegpy/bm4
scalaz-tests/src/test/scala/com/olegpy/bm4 Expand file tree Collapse file tree 8 files changed +17
-26
lines changed Original file line number Diff line number Diff line change @@ -13,15 +13,7 @@ ThisBuild / homepage := Some(url("http://github.com/oleg-py/better-monadic-for")
1313ThisBuild / scalaVersion := Option (System .getenv(" SCALA_VERSION" )).filter(_.nonEmpty).getOrElse(scala213)
1414
1515val testSettings = Seq (
16- libraryDependencies ++= Seq (
17- CrossVersion .partialVersion(scalaVersion.value) match {
18- case Some ((2 , 13 )) =>
19- // bincompatible enough :)
20- " org.scalatest" % " scalatest_2.13.0-RC3" % " 3.1.0-SNAP12" % Test
21- case _ => " org.scalatest" %% " scalatest" % " 3.1.0-SNAP12" % Test
22- }
23-
24- ),
16+ libraryDependencies += " org.scalatest" %% " scalatest" % " 3.1.2" % Test ,
2517 Test / scalacOptions ++= {
2618 val jar = (betterMonadicFor / Compile / packageBin).value
2719 Seq (s " -Xplugin: ${jar.getAbsolutePath}" , s " -Jdummy= ${jar.lastModified}" ) // ensures recompile
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
33import cats .Monad
4- import org .scalatest .FreeSpec
4+ import org .scalatest .freespec . AnyFreeSpec
55import cats .implicits ._
66
7- class CatsSyntaxTest extends FreeSpec {
7+ class CatsSyntaxTest extends AnyFreeSpec {
88 implicit val mcCatsInstance : cats.FlatMap [MapCheck ] = new cats.FlatMap [MapCheck ] {
99 def flatMap [A , B ](fa : MapCheck [A ])(f : A => MapCheck [B ]): MapCheck [B ] = {
1010 fa.flatMap(f)
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
33import org .ensime .pcplod ._
4- import org .scalatest .FreeSpec
4+ import org .scalatest .freespec . AnyFreeSpec
55
6- class PresentationCompiler extends FreeSpec {
6+ class PresentationCompiler extends AnyFreeSpec {
77 " PC should have no errors" in {
88 withMrPlod(" Arrows.scala" ) { pc =>
99 assert(pc.messages.isEmpty)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package com.olegpy.bm4
33import scala .concurrent .Future
44import scala .concurrent .duration .Duration
55
6- import org .scalatest .{ FreeSpec , FunSuite }
6+ import org .scalatest .freespec . AnyFreeSpec
77
88/** Mo is a lazy monad without `withFilter` */
99sealed trait Mo [A ] {
@@ -26,7 +26,7 @@ object Mo {
2626 val unit : Mo [Unit ] = Mo (())
2727}
2828
29- class TestFor extends FreeSpec {
29+ class TestFor extends AnyFreeSpec {
3030
3131 " Plugin allows" - {
3232 " destructuring for monads without withFilter" in {
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
3- import org .scalatest .FreeSpec
3+ import org .scalatest .freespec . AnyFreeSpec
44
55object CTTest {
66 def foo [A ]: Mo [A ] = for {
77 implicit0(a : A ) <- Mo .delay(null .asInstanceOf [A ])
88 } yield implicitly[A ]
99}
1010
11- class TestImplicitPatterns extends FreeSpec {
11+ class TestImplicitPatterns extends AnyFreeSpec {
1212 case class ImplicitTest (id : String )
1313 def typed [A ](a : A ) = ()
1414 case class ImplicitTest2 (id : String )
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
3- import org .scalatest .FreeSpec
3+ import org .scalatest .freespec . AnyFreeSpec
44
55case class MapCalled () extends Exception
66
@@ -9,7 +9,7 @@ class MapCheck[+A](a: A) {
99 def flatMap [B ](f : A => MapCheck [B ]): MapCheck [B ] = f(a)
1010}
1111
12- class TestNoMap extends FreeSpec {
12+ class TestNoMap extends AnyFreeSpec {
1313 " emits no map(b => b) in for-comprehension" in {
1414 for {
1515 _ <- new MapCheck (42 )
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
33import com .olegpy .bm4 .TestNoTuples .TupleChecker
4- import org .scalatest .FreeSpec
4+ import org .scalatest .freespec . AnyFreeSpec
55
6-
7- class TestNoTuples extends FreeSpec {
6+ class TestNoTuples extends AnyFreeSpec {
87 " Plugin removes tuples produced in binding" - {
98 " for single definition" in {
109 for {
@@ -147,4 +146,4 @@ object TestNoTuples {
147146 f(a)
148147 }
149148 }
150- }
149+ }
Original file line number Diff line number Diff line change 11package com .olegpy .bm4
22
3- import org .scalatest .FreeSpec
3+ import org .scalatest .freespec . AnyFreeSpec
44import scalaz ._ , Scalaz ._
55
6- class ScalazSyntaxTest extends FreeSpec {
6+ class ScalazSyntaxTest extends AnyFreeSpec {
77 implicit val scalazInstance : Bind [MapCheck ] = new Bind [MapCheck ] {
88 def bind [A , B ](fa : MapCheck [A ])(f : A => MapCheck [B ]): MapCheck [B ] = fa.flatMap(f)
99
@@ -19,4 +19,4 @@ class ScalazSyntaxTest extends FreeSpec {
1919
2020 sillyTest(new MapCheck (11 ), new MapCheck (42 ))
2121 }
22- }
22+ }
You can’t perform that action at this time.
0 commit comments