aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Pretty <jon.pretty@propensive.com>2017-10-31 11:11:58 +0100
committerJon Pretty <jon.pretty@propensive.com>2017-10-31 11:11:58 +0100
commit88f36a7a552246e210266a7ae82a2e480718512e (patch)
tree1bce74641f237d081f3d18fc7e5897ecfb2441b8 /tests
parent7b776425828d27b3112ad5bddafaa7564c326536 (diff)
downloadmagnolia-88f36a7a552246e210266a7ae82a2e480718512e.tar.gz
magnolia-88f36a7a552246e210266a7ae82a2e480718512e.tar.bz2
magnolia-88f36a7a552246e210266a7ae82a2e480718512e.zip
Support nontrivial type constructors
Diffstat (limited to 'tests')
-rw-r--r--tests/src/main/scala/tests.scala14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/src/main/scala/tests.scala b/tests/src/main/scala/tests.scala
index 6bfa1bd..ee3faf0 100644
--- a/tests/src/main/scala/tests.scala
+++ b/tests/src/main/scala/tests.scala
@@ -27,7 +27,7 @@ object Tests extends TestApp {
test("serialize a Branch") {
import magnolia.examples._
- implicitly[Show[Branch]].show(Branch(Leaf("LHS"), Leaf("RHS")))
+ implicitly[Show[String, Branch]].show(Branch(Leaf("LHS"), Leaf("RHS")))
}.assert(_ == "Branch(left=Leaf(value=LHS),right=Leaf(value=RHS))")
test("test equality false") {
@@ -52,23 +52,23 @@ object Tests extends TestApp {
test("construction of Show instance for Leaf") {
scalac"""
import magnolia.examples._
- implicitly[Show[Leaf]]
+ implicitly[Show[String, Leaf]]
"""
- }.assert(_ == (Returns(fqt"magnolia.examples.Show[magnolia.examples.Leaf]"): Compilation))
+ }.assert(_ == (Returns(fqt"magnolia.examples.Show[String,magnolia.examples.Leaf]"): Compilation))
test("construction of Show instance for Tree") {
scalac"""
import magnolia.examples._
- implicitly[Show[Tree]]
+ implicitly[Show[String, Tree]]
"""
- }.assert(_ == (Returns(fqt"magnolia.examples.Show[magnolia.examples.Tree]"): Compilation))
+ }.assert(_ == (Returns(fqt"magnolia.examples.Show[String,magnolia.examples.Tree]"): Compilation))
test("serialize a Leaf") {
- implicitly[Show[Leaf]].show(Leaf("testing"))
+ implicitly[Show[String, Leaf]].show(Leaf("testing"))
}.assert(_ == "Leaf(value=testing)")
test("serialize a Branch as a Tree") {
- implicitly[Show[Tree]].show(Branch(Leaf("LHS"), Leaf("RHS")))
+ implicitly[Show[String, Tree]].show(Branch(Leaf("LHS"), Leaf("RHS")))
}.assert(_ == "Branch(left=Leaf(value=LHS),right=Leaf(value=RHS))")
test("show error stack") {