diff options
author | Jon Pretty <jon.pretty@propensive.com> | 2017-06-23 14:20:40 +0200 |
---|---|---|
committer | Jon Pretty <jon.pretty@propensive.com> | 2017-06-23 14:20:40 +0200 |
commit | 2fa873cd0322d21148cf01d94e485e04b03cdb7c (patch) | |
tree | ad46dba1dfa747876cb0ee6f33e7c2163599511b /tests/shared/src | |
parent | f8ce6450c7dc1985db8ac29312bd76d3295257ab (diff) | |
download | magnolia-2fa873cd0322d21148cf01d94e485e04b03cdb7c.tar.gz magnolia-2fa873cd0322d21148cf01d94e485e04b03cdb7c.tar.bz2 magnolia-2fa873cd0322d21148cf01d94e485e04b03cdb7c.zip |
Tidied up and made it compile and run
Diffstat (limited to 'tests/shared/src')
-rw-r--r-- | tests/shared/src/main/scala/magnolia/cats.scala | 17 | ||||
-rw-r--r-- | tests/shared/src/main/scala/magnolia/main.scala | 17 |
2 files changed, 7 insertions, 27 deletions
diff --git a/tests/shared/src/main/scala/magnolia/cats.scala b/tests/shared/src/main/scala/magnolia/cats.scala deleted file mode 100644 index 4a1c096..0000000 --- a/tests/shared/src/main/scala/magnolia/cats.scala +++ /dev/null @@ -1,17 +0,0 @@ -package magnolia - -import examples.{Address, Branch, Country, Entity, Leaf, Person} -import cats.instances.all._ -import cats.syntax.all._ -import examples.cats.instances._ -import language.experimental.macros - -object CatsMain { - - def main(args: Array[String]): Unit = { - println(Branch(Branch(Leaf(1, "a"), Leaf(2, "b")), Leaf(3, "c")).show) - println(List[Entity](Person("John Smith", - Address(List("1 High Street", "London", "SW1A 1AA"), - Country("UK", "GBR", false)))).show) - } -} diff --git a/tests/shared/src/main/scala/magnolia/main.scala b/tests/shared/src/main/scala/magnolia/main.scala index 4a9347a..c6cd9bc 100644 --- a/tests/shared/src/main/scala/magnolia/main.scala +++ b/tests/shared/src/main/scala/magnolia/main.scala @@ -1,24 +1,21 @@ package magnolia -import examples._ -import examples.Show._ +import examples.{Address, Branch, Country, Entity, Leaf, Person} +import cats.instances.all._ +import cats.syntax.all._ +import examples.catsShowDerivation._ +import language.experimental.macros object Main { - def main(args: Array[String]): Unit = { - val tree1: Tree = Branch(Branch(Leaf(1), Leaf(2)), Leaf(3)) - val tree2: Tree = Branch(Leaf(1), Leaf(2)) + def main(args: Array[String]): Unit = { + val tree1 = Branch(Branch(Leaf(1), Leaf(2)), Leaf(3)) println(tree1.show) println(tree1 isEqualTo tree1) - println(tree1 isEqualTo tree2) - println(Branch(Branch(Leaf(1), Leaf(2)), Leaf(3)).show) - println(List[Entity](Person("John Smith", Address(List("1 High Street", "London", "SW1A 1AA"), Country("UK", "GBR", false)))).show) - } } - |