diff options
author | Mathias <mathias@spray.io> | 2012-12-19 14:00:08 +0100 |
---|---|---|
committer | Mathias <mathias@spray.io> | 2012-12-19 14:00:08 +0100 |
commit | 76c8a574718d53156b76b67bfea3de8942e948f5 (patch) | |
tree | 8edef6bbc8910f94e41be784cb71d1eedffd2d63 | |
parent | 303713ea4ce2784e89c463a2716f36768f0728bf (diff) | |
download | spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.tar.gz spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.tar.bz2 spray-json-76c8a574718d53156b76b67bfea3de8942e948f5.zip |
Upgrade to Scala 2.10.0-RC5
-rw-r--r-- | build.sbt | 4 | ||||
-rw-r--r-- | src/test/scala/spray/json/ProductFormatsSpec.scala | 11 |
2 files changed, 13 insertions, 2 deletions
@@ -14,7 +14,7 @@ startYear := Some(2011) licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.0.txt")) -scalaVersion := "2.10.0-RC3" +scalaVersion := "2.10.0-RC5" scalacOptions <<= scalaVersion map { case x if x startsWith "2.9" => @@ -37,7 +37,7 @@ scaladocOptions <<= (name, version).map { (n, v) => Seq("-doc-title", n + " " + // publishing /////////////// -crossScalaVersions := Seq("2.9.2", "2.10.0-RC3") +crossScalaVersions := Seq("2.9.2", "2.10.0-RC5") scalaBinaryVersion <<= scalaVersion(sV => if (CrossVersion.isStable(sV)) CrossVersion.binaryScalaVersion(sV) else sV) diff --git a/src/test/scala/spray/json/ProductFormatsSpec.scala b/src/test/scala/spray/json/ProductFormatsSpec.scala index e452639..ec9d65f 100644 --- a/src/test/scala/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/spray/json/ProductFormatsSpec.scala @@ -84,4 +84,15 @@ class ProductFormatsSpec extends Specification { } } + "A JsonFormat for a generic case class with an explicitly provided type parameter" should { + "support the jsonFormat1 syntax" in { + case class Box[A](a: A) + object BoxProtocol extends DefaultJsonProtocol { + implicit val boxFormat = jsonFormat1(Box[Int]) + } + import BoxProtocol._ + Box(42).toJson === JsObject(Map("a" -> JsNumber(42))) + } + } + } |