Skip to content

Commit

Permalink
Update ExampleTests.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Jul 11, 2024
1 parent c8541d9 commit b87923a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions upickle/test/src/upickle/example/ExampleTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,12 @@ object ExampleTests extends TestSuite {
write(Some(1)) ==> "[1]"
write(None) ==> "[]"
}

test("either") {
write(Left(42): Either[Int, String]) ==> "[0,42]"
write(Right("foo"): Either[Int, String]) ==> """[1,"foo"]"""
}

test("tuples"){
write((1, "omg")) ==> """[1,"omg"]"""
write((1, "omg", true)) ==> """[1,"omg",true]"""
Expand Down

0 comments on commit b87923a

Please sign in to comment.