summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-10-31 20:54:00 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2017-10-31 20:54:00 -0700
commitf63535b955941e1a9a0f84abeaf53bb2f2cc2fc4 (patch)
treec9ed2e76692df275a7456b4bd7230a6132ae366a /src/test
parentc8fa7e83c1934e30e178cb727d98dcf367a13d93 (diff)
downloadmill-f63535b955941e1a9a0f84abeaf53bb2f2cc2fc4.tar.gz
mill-f63535b955941e1a9a0f84abeaf53bb2f2cc2fc4.tar.bz2
mill-f63535b955941e1a9a0f84abeaf53bb2f2cc2fc4.zip
Sketched out `MetacircularTests` using `scalaplugin.Subproject`; still doesn't compile
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/forge/IntegrationTests.scala2
-rw-r--r--src/test/scala/forge/MetacircularTests.scala40
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)
+
+ }
+ }
+}