summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-10-29 06:05:59 -0700
committerLi Haoyi <haoyi.sg@gmail.com>2017-10-29 06:05:59 -0700
commitd1a8e26b0b747885782d261d17dbb1ce8d53a36b (patch)
treedd4c92cea66889f0f649d01dd17566dc1fbb4c7a /src/test
parentc2d3346178790d5b5c4462f55bfb0d23ad2b28a4 (diff)
downloadmill-d1a8e26b0b747885782d261d17dbb1ce8d53a36b.tar.gz
mill-d1a8e26b0b747885782d261d17dbb1ce8d53a36b.tar.bz2
mill-d1a8e26b0b747885782d261d17dbb1ce8d53a36b.zip
Swap over in-memory results cache to disk-based JSON metadata
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/forge/EvaluationTests.scala10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/scala/forge/EvaluationTests.scala b/src/test/scala/forge/EvaluationTests.scala
index c42aba80..b9318c43 100644
--- a/src/test/scala/forge/EvaluationTests.scala
+++ b/src/test/scala/forge/EvaluationTests.scala
@@ -3,18 +3,20 @@ package forge
import java.nio.{file => jnio}
import utest._
+import utest.framework.TestPath
object EvaluationTests extends TestSuite{
- val workspace = jnio.Paths.get("target/workspace")
val tests = Tests{
val graphs = new TestGraphs()
import graphs._
'evaluateSingle - {
-
- class Checker[T: Discovered](base: T) {
- val evaluator = new Evaluator(
+ class Checker[T: Discovered](base: T)(implicit tp: TestPath) {
+ val workspace = jnio.Paths.get("target/workspace", tp.value.mkString("/"))
+ ammonite.ops.rm(ammonite.ops.Path(workspace, ammonite.ops.pwd))
+ // Make sure data is persisted even if we re-create the evaluator each time
+ def evaluator = new Evaluator(
workspace,
implicitly[Discovered[T]].apply(base).map(_.swap).toMap
)