Skip to content

Commit

Permalink
Adding more JSON tests, including a failing JSON test due to #10
Browse files Browse the repository at this point in the history
  • Loading branch information
heathermiller authored and xeno-by committed Jun 2, 2013
1 parent c2d45ba commit e926393
Show file tree
Hide file tree
Showing 6 changed files with 335 additions and 327 deletions.
17 changes: 0 additions & 17 deletions core/src/test/scala/pickling/binary-check-array-int.scala

This file was deleted.

This file was deleted.

19 changes: 19 additions & 0 deletions core/src/test/scala/pickling/json-non-primitive-field.scala
@@ -0,0 +1,19 @@
package scala.pickling.json.non.primitive.field

import org.scalatest.FunSuite
import scala.pickling._
import json._

case class Person(name: String, age: Int)
case class Philipp(mother: Person)

class JSONNonPrimitiveFieldTest extends FunSuite {
test("main") {
val gudrun = Person("Gudrun", 62)
val p = Philipp(gudrun)
val pckl = p.pickle

assert(pckl.value.mkString("[", ",", "]") === "[0,0,0,49,115,99,97,108,97,46,112,105,99,107,108,105,110,103,46,98,105,110,97,114,121,46,110,111,110,46,112,114,105,109,105,116,105,118,101,46,102,105,101,108,100,46,80,104,105,108,105,112,112,-1,0,0,0,6,71,117,100,114,117,110,0,0,0,62]")
assert(pckl.unpickle[Philipp] === p)
}
}
148 changes: 0 additions & 148 deletions core/src/test/scala/pickling/pickling-binary-spec.scala

This file was deleted.

142 changes: 0 additions & 142 deletions core/src/test/scala/pickling/pickling-json-spec.scala

This file was deleted.

0 comments on commit e926393

Please sign in to comment.