diff options
author | Johannes Rudolph <johannes.rudolph@gmail.com> | 2013-05-29 15:16:41 +0200 |
---|---|---|
committer | Johannes Rudolph <johannes.rudolph@gmail.com> | 2013-05-29 15:16:41 +0200 |
commit | 4edd64ff6c577afacacc1c03657da911dd90abde (patch) | |
tree | bdc8e89a5880bb486c8e23e4fa0c54a972d928c6 /src/test/scala/cc | |
parent | f44a1182c9f7ea0c41bfc02ca32f62531ff86d2a (diff) | |
download | spray-json-4edd64ff6c577afacacc1c03657da911dd90abde.tar.gz spray-json-4edd64ff6c577afacacc1c03657da911dd90abde.tar.bz2 spray-json-4edd64ff6c577afacacc1c03657da911dd90abde.zip |
get rid of setOrUpdateField(f: Option[T] => T) because it basically has no advantage over the other overload
but interferes with type inference
Diffstat (limited to 'src/test/scala/cc')
-rw-r--r-- | src/test/scala/cc/spray/json/lenses/JsonLensesSpec.scala | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/test/scala/cc/spray/json/lenses/JsonLensesSpec.scala b/src/test/scala/cc/spray/json/lenses/JsonLensesSpec.scala index 3f7b0ff..1c3f7c1 100644 --- a/src/test/scala/cc/spray/json/lenses/JsonLensesSpec.scala +++ b/src/test/scala/cc/spray/json/lenses/JsonLensesSpec.scala @@ -127,9 +127,6 @@ class JsonLensesSpec extends Specification with SpecHelpers { "set or update with default" in { """[{"b": 4}, {"c": 5}]""".update((* / 'b.?) ! setOrUpdateField(38)(1 + )) must be_json("""[{"b": 5}, {"c": 5, "b": 38}]""") } - "set or update with function" in { - """[{"b": 4}, {"c": 5}]""".update((* / 'b.?) ! setOrUpdateField[Int]((_: Option[Int]).map(1+).getOrElse(38))) must be_json("""[{"b": 5}, {"c": 5, "b": 38}]""") - } "create nested (current behavior)" in { // One could think that nested `optionalField`s and `set` would create intermediate |