Skip to content

Commit

Permalink
split test cases to more accurately reflect what's tested
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Jun 25, 2024
1 parent cdf2976 commit 61d7dd5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions csv/shared/src/test/scala/fs2/data/csv/CellEncoderTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ object CellEncoderTest extends SimpleIOSuite {
.apply(java.time.LocalTime.of(13, 4, 29)) == "13:04:29")
}

pureTest("CellEncoder instance can be built from correct cats.Show instance") {
pureTest("CellEncoder instance can be built from native cats.Show instance") {
expect(CellEncoder.fromShow[Unit].apply(()) == "()")
}

pureTest("CellEncoder instance can be built from local cats.Show instance") {
implicit val showInt42: Show[Int] = Show.show(_ => "42")
expect(CellEncoder.fromShow[Unit].apply(()) == "()") and
expect(CellEncoder.fromShow[Int].apply(78) == "42")
expect(CellEncoder.fromShow[Int].apply(78) == "42")
}

}

0 comments on commit 61d7dd5

Please sign in to comment.