Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Serialize and deserialize Map containing BigInt and BigDecimal does not work #379

@lshlyapnikov

Description

@lshlyapnikov

Scalacheck found the failing test case:

import scala.pickling.Defaults._
import scala.pickling.binary._

    val bigInt0 = BigInt("-85070591730234615865843651857942052864")
    val bigDecimal0 = BigDecimal("2.147484E-1469790866")
    val map0: Map[String, Any] = Map("a" -> bigInt0, "b" -> bigDecimal0)
    val bytes = map0.pickle.value
    val map1 = bytes.unpickle[Map[String, Any]]

    map1 shouldBe map0
    map1("a") shouldBe bigInt0
    map1("b") shouldBe bigDecimal0

Map("a" -> 0, "b" -> 0) was not equal to Map("a" -> -85070591730234615865843651857942052864, "b" -> 2.147484E-1469790866)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions