Make BatchScriptRunner.States hold StatementHandler#State

This commit is contained in:
Dale Wijnand 2018-01-24 14:46:41 +00:00
parent 9d808a389c
commit b8abf4285f
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 8 additions and 7 deletions

View File

@ -8,11 +8,17 @@
package sbt
package scriptedtest
import scala.collection.mutable
import sbt.internal.scripted._
import sbt.scriptedtest.BatchScriptRunner.States
private[sbt] object BatchScriptRunner {
type States = mutable.HashMap[StatementHandler, StatementHandler#State]
}
/** Defines an alternative script runner that allows batch execution. */
private[sbt] class BatchScriptRunner extends ScriptRunner {
import BatchScriptRunner.States
/** Defines a method to run batched execution.
*
@ -58,8 +64,3 @@ private[sbt] class BatchScriptRunner extends ScriptRunner {
}
}
}
private[sbt] object BatchScriptRunner {
import scala.collection.mutable
type States = mutable.HashMap[StatementHandler, Any]
}

View File

@ -60,7 +60,7 @@ final class ScriptedTests(resourceBaseDirectory: File,
val handlers =
createScriptedHandlers(testDirectory, buffer, RemoteSbtCreatorKind.LauncherBased)
val runner = new BatchScriptRunner
val states = new mutable.HashMap[StatementHandler, Any]()
val states = new mutable.HashMap[StatementHandler, StatementHandler#State]()
commonRunTest(label, testDirectory, prescripted, handlers, runner, states, buffer)
}
runOrHandleDisabled(label, testDirectory, singleTestRunner, buffer)