diff --git a/core-tests/jvm/src/test/scala/zio/PlatformSpec.scala b/core-tests/jvm/src/test/scala/zio/PlatformSpec.scala deleted file mode 100644 index b144bc70a1a3..000000000000 --- a/core-tests/jvm/src/test/scala/zio/PlatformSpec.scala +++ /dev/null @@ -1,22 +0,0 @@ -package zio - -final class PlatformSpec(implicit ee: org.specs2.concurrent.ExecutionEnv) extends TestRuntime { - - def is = "PlatformSpec".title ^ s2""" - PlatformLive fatal: - `Platform.fatal` should identify a nonFatal exception $e1 - `Platform.fatal` should identify a fatal exception $e2 - """ - - def e1 = { - val nonFatal = new Exception - - Platform.fatal(nonFatal) must_=== false - } - - def e2 = { - val fatal = new OutOfMemoryError - - Platform.fatal(fatal) must_=== true - } -} diff --git a/core-tests/jvm/src/test/scala/zio/platform/PlatformSpec.scala b/core-tests/jvm/src/test/scala/zio/platform/PlatformSpec.scala new file mode 100644 index 000000000000..cc523653d6ad --- /dev/null +++ b/core-tests/jvm/src/test/scala/zio/platform/PlatformSpec.scala @@ -0,0 +1,22 @@ +package zio.platform + +import zio.ZIOBaseSpec +import zio.test.Assertion._ +import zio.test._ +import zio.test.mock.EnvironmentSpec.Platform + +object PlatformSpec + extends ZIOBaseSpec( + suite("PlatformSpec")( + suite("PlatformLive fatal:")( + test("Platform.fatal should identify a nonFatal exception") { + val nonFatal = new Exception + assert(Platform.fatal(nonFatal), isFalse) + }, + test("Platform.fatal should identify a fatal exception") { + val fatal = new OutOfMemoryError + assert(Platform.fatal(fatal), isTrue) + } + ) + ) + )