From 34498de80d44d8c72d8f38a7139f4b247f99cf69 Mon Sep 17 00:00:00 2001 From: Kai <450507+neko-kai@users.noreply.github.com> Date: Mon, 16 Oct 2023 19:53:36 +0100 Subject: [PATCH] move ZIO test to JVM-only --- .../functional/bio/ErrorAccumulatingOpsTestZIO.scala | 8 ++++++++ .../izumi/functional/bio/ErrorAccumulatingOpsTest.scala | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 fundamentals/fundamentals-bio/.jvm/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTestZIO.scala diff --git a/fundamentals/fundamentals-bio/.jvm/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTestZIO.scala b/fundamentals/fundamentals-bio/.jvm/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTestZIO.scala new file mode 100644 index 0000000000..2fa5d03b44 --- /dev/null +++ b/fundamentals/fundamentals-bio/.jvm/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTestZIO.scala @@ -0,0 +1,8 @@ +package izumi.functional.bio + +final class ErrorAccumulatingOpsTestZIO extends ErrorAccumulatingOpsTest[zio.IO] { + private val runner: UnsafeRun2[zio.IO] = UnsafeRun2.createZIO() + + override implicit def F: Error2[zio.IO] = Root.Convert3To2(Root.BIOZIO) + override def unsafeRun[E, A](f: zio.IO[E, A]): Either[E, A] = runner.unsafeRun(f.attempt) +} diff --git a/fundamentals/fundamentals-bio/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTest.scala b/fundamentals/fundamentals-bio/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTest.scala index 2fe90a90d7..b5aee73353 100644 --- a/fundamentals/fundamentals-bio/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTest.scala +++ b/fundamentals/fundamentals-bio/src/test/scala/izumi/functional/bio/ErrorAccumulatingOpsTest.scala @@ -10,13 +10,6 @@ final class ErrorAccumulatingOpsTestEither extends ErrorAccumulatingOpsTest[Eith override def unsafeRun[E, A](f: Either[E, A]): Either[E, A] = f } -final class ErrorAccumulatingOpsTestZIO extends ErrorAccumulatingOpsTest[zio.IO] { - private val runner: UnsafeRun2[zio.IO] = UnsafeRun2.createZIO() - - override implicit def F: Error2[zio.IO] = Root.Convert3To2(Root.BIOZIO) - override def unsafeRun[E, A](f: zio.IO[E, A]): Either[E, A] = runner.unsafeRun(f.attempt) -} - @nowarn("msg=Unused import") abstract class ErrorAccumulatingOpsTest[F[+_, +_]] extends AnyWordSpec { import scala.collection.compat.*