aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJon Pretty <jon.pretty@propensive.com>2017-11-30 18:32:07 +0000
committerJon Pretty <jon.pretty@propensive.com>2017-11-30 18:32:07 +0000
commit13fcfba5aa5d6a90b90c22088cb9b8da5e2823fe (patch)
tree108d5b0fbdb814c8b85d7e9814f811adb94d7aeb /tests
parente2191e2687b671d4a8610544251e7e807f2793da (diff)
downloadmagnolia-13fcfba5aa5d6a90b90c22088cb9b8da5e2823fe.tar.gz
magnolia-13fcfba5aa5d6a90b90c22088cb9b8da5e2823fe.tar.bz2
magnolia-13fcfba5aa5d6a90b90c22088cb9b8da5e2823fe.zip
typeName is now the full name of the type, in original case
Diffstat (limited to 'tests')
-rw-r--r--tests/src/main/scala/tests.scala14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/src/main/scala/tests.scala b/tests/src/main/scala/tests.scala
index 4c2a48e..96a2c2b 100644
--- a/tests/src/main/scala/tests.scala
+++ b/tests/src/main/scala/tests.scala
@@ -1,5 +1,7 @@
package magnolia.tests
+import language.experimental.macros
+
import magnolia._
import estrapade._
import contextual.data.scalac._
@@ -51,7 +53,7 @@ case class Portfolio(companies: Company*)
object Tests extends TestApp {
- def tests() = for (i <- 1 to 1000) {
+ def tests() = for (i <- 1 to 1) {
import examples._
test("construct a Show product instance with alternative apply functions") {
@@ -215,5 +217,15 @@ object Tests extends TestApp {
test("show a Portfolio of Companies") {
Show.gen[Portfolio].show(Portfolio(Company("Alice Inc"), Company("Bob & Co")))
}.assert(_ == "Portfolio(companies=[Company(name=Alice Inc),Company(name=Bob & Co)])")
+
+ test("sealed trait typeName should be complete and unchanged") {
+ TypeName.gen[Color].name
+ }.assert(_ == "magnolia.tests.Color")
+
+ test("case class typeName should be complete and unchanged") {
+ implicit val stringTypeName: TypeName[String] = new TypeName[String] { def name = "" }
+ TypeName.gen[Fruit].name
+ }.assert(_ == "magnolia.tests.Fruit")
+
}
}