From 18de9a4ceb2e6fcd6c9bc363dda4f55d048591f1 Mon Sep 17 00:00:00 2001 From: satorg Date: Mon, 31 Oct 2022 01:26:40 -0700 Subject: [PATCH] add tests for NonEmptyAlternative --- .../tests/IndexedReaderWriterStateTSuite.scala | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala b/tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala index efd8ecdc45f..8f19699673f 100644 --- a/tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala +++ b/tests/shared/src/test/scala/cats/tests/IndexedReaderWriterStateTSuite.scala @@ -453,6 +453,24 @@ class IndexedReaderWriterStateTSuite extends CatsSuite { ) } + { + implicit val LWM: Monad[ListWrapper] = ListWrapper.monad + + val SA = { + implicit val LWA: NonEmptyAlternative[ListWrapper] = ListWrapper.nonEmptyAlternative + NonEmptyAlternative[IRWST[ListWrapper, Boolean, String, MiniInt, MiniInt, *]] + } + + checkAll( + "IndexedReaderWriterStateT[ListWrapper, Boolean, String, MiniInt, MiniInt, *]", + NonEmptyAlternativeTests(SA).nonEmptyAlternative[Int, Int, Int] + ) + checkAll( + "NonEmptyAlternativeTests[IndexedReaderWriterStateT[ListWrapper, Boolean, String, MiniInt, MiniInt, *]]", + SerializableTests.serializable(SA) + ) + } + { implicit val LWM: Monad[ListWrapper] = ListWrapper.monad