Testing out JmonkeyEngine to make a game in Scala with Akka Actors within a pure FP layer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
720 B

3 years ago
  1. package wow.doge.mygame
  2. import org.scalatest.funsuite.AnyFunSuite
  3. import wow.doge.mygame.subsystems.moddingsystem.ModdingSystem
  4. import monix.execution.Scheduler.Implicits.global
  5. import io.circe.Printer
  6. import monix.bio.UIO
  7. import cats.syntax.eq._
  8. class ModdingSystemTest extends AnyFunSuite {
  9. val printer = Printer.spaces2
  10. test("main") {
  11. val io = for {
  12. res <- ModdingSystem.run()
  13. _ <- UIO(
  14. assert(
  15. (res.parseSuccesses.length + res.parseFailures.length) eqv res.readSuccesses.length
  16. )
  17. )
  18. _ <- ModdingSystem.log(res)
  19. } yield res
  20. io.attempt.runSyncUnsafe() match {
  21. case Left(value) => pprint.log(value); ()
  22. case Right(value) => ()
  23. }
  24. }
  25. }