Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding more JSON tests, including a failing JSON test due to #10
- Loading branch information
1 parent
c2d45ba
commit e926393
Showing
6 changed files
with
335 additions
and
327 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
core/src/test/scala/pickling/binary-check-case-class-int-string.scala
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
core/src/test/scala/pickling/json-non-primitive-field.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
148
core/src/test/scala/pickling/pickling-binary-spec.scala
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.