Skip to content

Commit

Permalink
Add notes for #60
Browse files Browse the repository at this point in the history
  • Loading branch information
kubukoz committed Jul 11, 2021
1 parent d94b22d commit 6ef12a5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/src/test/scala-3/Scala3Tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ class Scala3Tests extends FunSuite:
test("an enum made of constants should have a normal toString") {
assertEquals(
ScalaVersion.Scala2.toString,
// https://github.com/polyvariant/better-tostring/issues/60
// should be "ScalaVersion.Scala2"
"Scala2"
)
assertEquals(
ScalaVersion.Scala3.toString,
// https://github.com/polyvariant/better-tostring/issues/60
// should be "ScalaVersion.Scala3"
"Scala3"
)
}
Expand All @@ -17,6 +21,12 @@ class Scala3Tests extends FunSuite:
User.LoggedIn("admin").toString,
"User.LoggedIn(name = admin)"
)
assertEquals(
User.Unauthorized.toString,
// https://github.com/polyvariant/better-tostring/issues/60
// should be "User.Unauthorized"
"Unauthorized"
)
}

test("an enum with a custom toString should use it") {
Expand Down

0 comments on commit 6ef12a5

Please sign in to comment.