From 88f36a7a552246e210266a7ae82a2e480718512e Mon Sep 17 00:00:00 2001 From: Jon Pretty Date: Tue, 31 Oct 2017 11:11:58 +0100 Subject: Support nontrivial type constructors --- tests/src/main/scala/tests.scala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests') 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") { -- cgit v1.2.3