amnaredo / test

0 stars 0 forks source link

Upickle doesn't output default values #241

Open amnaredo opened 3 years ago

amnaredo commented 3 years ago

Hi,

The test below fails for 0.7.1. The ouput of write(Default()) is {}. Is there a workaround?

class UpickleSpec extends WordSpec with Matchers {

  "UpickleSpec" should {

    "handle default values" in {
      write(Default()).contains("value") shouldBe true
    }
  }

  case class Default(value: Int = 321)

  object Default {
    implicit val RW: RW[Default] = macroRW
  }

}

ID: 254 Original Author: jCalamari

amnaredo commented 3 years ago

This is documented and working as intended. Feel free to send a PR if you want to make it configurable Original Author: lihaoyi