diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/forge/IntegrationTests.scala | 2 | ||||
-rw-r--r-- | src/test/scala/forge/MetacircularTests.scala | 40 |
2 files changed, 41 insertions, 1 deletions
diff --git a/src/test/scala/forge/IntegrationTests.scala b/src/test/scala/forge/IntegrationTests.scala index b28dfd41..08e7d132 100644 --- a/src/test/scala/forge/IntegrationTests.scala +++ b/src/test/scala/forge/IntegrationTests.scala @@ -54,7 +54,7 @@ object IntegrationTests extends TestSuite{ cp(javacSrcPath, javacDestPath) object Build { - val sourceRootPath = javacDestPath / 'src + val sourceRootPath = javacDestPath / 'src val resourceRootPath = javacDestPath / 'resources // sourceRoot -> allSources -> classFiles diff --git a/src/test/scala/forge/MetacircularTests.scala b/src/test/scala/forge/MetacircularTests.scala new file mode 100644 index 00000000..f7202287 --- /dev/null +++ b/src/test/scala/forge/MetacircularTests.scala @@ -0,0 +1,40 @@ +package forge + +import ammonite.ops.pwd +import coursier.{Dependency => Dep, Module => Mod} +import forge.util.{OSet, PathRef} +import utest._ + +object MetacircularTests extends TestSuite{ + object Self extends scalaplugin.Subproject { + val scalaVersion = T{ "2.12.4" } + override val compileDeps = T{ + for(scalaVersion <- scalaVersion) yield Seq( + Dep(Mod("org.scala-lang", "scala-reflect"), scalaVersion, configuration = "provided"), + ) + } + + override val deps = T{ + for((scalaVersion, scalaBinaryVersion) <- zip(scalaVersion, scalaBinaryVersion)) yield Seq( + Dep(Mod("com.lihaoyi", "sourcecode_" + scalaBinaryVersion), "0.1.4"), + Dep(Mod("com.lihaoyi", "pprint_" + scalaBinaryVersion), "0.5.3"), + Dep(Mod("com.lihaoyi", "ammonite_" + scalaVersion), "1.0.3"), + Dep(Mod("com.typesafe.play", "play-json_" + scalaBinaryVersion), "2.6.6"), + Dep(Mod("org.scala-sbt", "zinc_" + scalaBinaryVersion), "1.0.3") + ) + } + + val basePath = pwd + override val sources = T{ PathRef(pwd/'src/'main/'scala) } + override val resources = T{ PathRef(pwd/'src/'main/'resources) } + } + val tests = Tests{ + 'scalac { + val workspacePath = pwd / 'target / 'workspace / 'meta +// val mapping = Discovered.mapping(Self) +// val evaluator = new Evaluator(workspacePath, mapping) +// val evaluated = evaluator.evaluate(OSet(Self.deps)).evaluated.filter(mapping.contains) + + } + } +} |