From dce01e96d18c2f5b2451556586569a75636ba9f7 Mon Sep 17 00:00:00 2001 From: Donovan de Kuiper Date: Fri, 21 Dec 2018 10:46:59 +0100 Subject: [PATCH] Added String and Boolean to Default Type Test Fixed Long to actually check Long Removed unused import in Macros --- macros/src/main/scala/Macros.scala | 2 +- src/test/scala/nl/codestar/scalatsi/DefaultTSTypeTests.scala | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/macros/src/main/scala/Macros.scala b/macros/src/main/scala/Macros.scala index 313d0e56..69881579 100644 --- a/macros/src/main/scala/Macros.scala +++ b/macros/src/main/scala/Macros.scala @@ -54,7 +54,7 @@ private class Macros(val c: blackbox.Context) { q"""{ import nl.codestar.scalatsi.TypescriptType._ - import nl.codestar.scalatsi.{ TSType, TSNamedType, TSIType } + import nl.codestar.scalatsi.{ TSNamedType, TSIType } import scala.collection.immutable.ListMap TSIType(TSInterface("I" + ${symbol.name.toString}, ListMap(..$members))) }""" diff --git a/src/test/scala/nl/codestar/scalatsi/DefaultTSTypeTests.scala b/src/test/scala/nl/codestar/scalatsi/DefaultTSTypeTests.scala index f111857c..ad715384 100644 --- a/src/test/scala/nl/codestar/scalatsi/DefaultTSTypeTests.scala +++ b/src/test/scala/nl/codestar/scalatsi/DefaultTSTypeTests.scala @@ -8,8 +8,10 @@ import org.scalatest.{Matchers, WordSpec} class DefaultTSTypeTests extends WordSpec with Matchers with DefaultTSTypes { "Default TS Types should be defined" forWord { + "String" in { "implicitly[TSType[String]]" should compile } + "Boolean" in { "implicitly[TSType[Boolean]]" should compile} "Int" in { "implicitly[TSType[Int]]" should compile } - "Long" in { "implicitly[TSType[Int]]" should compile } + "Long" in { "implicitly[TSType[Long]]" should compile } "Double" in { "implicitly[TSType[Double]]" should compile } "scala.math.BigDecimal" in { "implicitly[TSType[scala.math.BigDecimal]]" should compile } "java.math.BigDecimal" in { "implicitly[TSType[java.math.BigDecimal]]" should compile }