diff options
author | Steffen Fritzsche <steffen.fritzsche@uni-ulm.de> | 2011-10-11 18:33:59 +0200 |
---|---|---|
committer | Steffen Fritzsche <steffen.fritzsche@uni-ulm.de> | 2011-10-11 18:33:59 +0200 |
commit | fe8fca4e69a21b5a795a000d4bd27026a06aa6a0 (patch) | |
tree | ff1f4ab000c68f18c8b63cbba19ca8f019b3a600 /src/test | |
parent | 211e72c22cf620c12835738b2a62c50867331fa6 (diff) | |
download | spray-json-fe8fca4e69a21b5a795a000d4bd27026a06aa6a0.tar.gz spray-json-fe8fca4e69a21b5a795a000d4bd27026a06aa6a0.tar.bz2 spray-json-fe8fca4e69a21b5a795a000d4bd27026a06aa6a0.zip |
Implemented deserialization support (Issue #8)
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/cc/spray/json/BasicFormatsSpec.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/scala/cc/spray/json/BasicFormatsSpec.scala b/src/test/scala/cc/spray/json/BasicFormatsSpec.scala index 7f74e37..11576a4 100644 --- a/src/test/scala/cc/spray/json/BasicFormatsSpec.scala +++ b/src/test/scala/cc/spray/json/BasicFormatsSpec.scala @@ -38,6 +38,9 @@ class BasicFormatsSpec extends Specification with DefaultJsonProtocol { "convert a JsNumber to a Float" in { JsNumber(4.2f).fromJson[Float] mustEqual 4.2f } + "convert a JsNull to a Float" in { + JsNull.fromJson[Float].isNaN mustEqual Float.NaN.isNaN + } } "The DoubleJsonFormat" should { @@ -56,6 +59,9 @@ class BasicFormatsSpec extends Specification with DefaultJsonProtocol { "convert a JsNumber to a Double" in { JsNumber(4.2).fromJson[Double] mustEqual 4.2 } + "convert a JsNull to a Double" in { + JsNull.fromJson[Double].isNaN mustEqual Double.NaN.isNaN + } } "The ByteJsonFormat" should { |