diff options
Diffstat (limited to 'src/test/scala/spray/json/BasicFormatsSpec.scala')
-rw-r--r-- | src/test/scala/spray/json/BasicFormatsSpec.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/scala/spray/json/BasicFormatsSpec.scala b/src/test/scala/spray/json/BasicFormatsSpec.scala index 629c223..00da813 100644 --- a/src/test/scala/spray/json/BasicFormatsSpec.scala +++ b/src/test/scala/spray/json/BasicFormatsSpec.scala @@ -105,6 +105,9 @@ class BasicFormatsSpec extends Specification with DefaultJsonProtocol { "convert a JsNumber to a BigDecimal" in { JsNumber(42).convertTo[BigDecimal] mustEqual BigDecimal(42) } + """convert a JsString to a BigDecimal (to allow the quoted-large-numbers pattern)""" in { + JsString("9223372036854775809").convertTo[BigDecimal] mustEqual BigDecimal("9223372036854775809") + } } "The BigIntJsonFormat" should { @@ -114,6 +117,9 @@ class BasicFormatsSpec extends Specification with DefaultJsonProtocol { "convert a JsNumber to a BigInt" in { JsNumber(42).convertTo[BigInt] mustEqual BigInt(42) } + """convert a JsString to a BigInt (to allow the quoted-large-numbers pattern)""" in { + JsString("9223372036854775809").convertTo[BigInt] mustEqual BigInt("9223372036854775809") + } } "The UnitJsonFormat" should { |