Skip to content

Commit

Permalink
refactor tests for Alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Oct 31, 2022
1 parent b736ea1 commit 2f53e1e
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -454,19 +454,20 @@ class IndexedReaderWriterStateTSuite extends CatsSuite {
}

{
implicit val G: Monad[ListWrapper] = ListWrapper.monad
implicit val LWM: Monad[ListWrapper] = ListWrapper.monad

val SA = IRWST.catsDataAlternativeForIRWST[ListWrapper, Boolean, String, MiniInt](ListWrapper.monad,
ListWrapper.alternative,
Monoid[String]
)
val SA = {
implicit val LWA: Alternative[ListWrapper] = ListWrapper.alternative
Alternative[IRWST[ListWrapper, Boolean, String, MiniInt, MiniInt, *]]
}

checkAll(
"IndexedReaderWriterStateT[ListWrapper, String, String, Int, Int, *]",
AlternativeTests[IRWST[ListWrapper, Boolean, String, MiniInt, MiniInt, *]](SA).alternative[Int, Int, Int]
"IndexedReaderWriterStateT[ListWrapper, Boolean, String, MiniInt, MiniInt, *]",
AlternativeTests(SA).alternative[Int, Int, Int]
)
checkAll("Alternative[IndexedReaderWriterStateT[ListWrapper, String, String, Int, Int, *]]",
SerializableTests.serializable(SA)
checkAll(
"Alternative[IndexedReaderWriterStateT[ListWrapper, Boolean, String, MiniInt, MiniInt, *]]",
SerializableTests.serializable(SA)
)
}

Expand Down

0 comments on commit 2f53e1e

Please sign in to comment.