Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Commit 754c2ff

Browse files
committed
Adds tests for #158
1 parent d63e92e commit 754c2ff

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package scala.pickling.methodinobject
2+
3+
import org.scalatest.FunSuite
4+
5+
object Test extends App {
6+
import scala.pickling._
7+
import json._
8+
def test(): String = {
9+
case class Person(name: String, age: Int) // case class defined in func test
10+
val res = Person("Hao", 10).pickle.value
11+
res
12+
}
13+
test
14+
}
15+
16+
class MethodInObjectTest extends FunSuite {
17+
test("main") {
18+
assert(Test.test === """
19+
|{
20+
| "tpe": "Person",
21+
| "name": "Hao",
22+
| "age": 10
23+
|}
24+
""".stripMargin.trim)
25+
}
26+
}

0 commit comments

Comments
 (0)