mirror of
https://github.com/sbt/sbt.git
synced 2026-09-07 11:01:08 +02:00
Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification. * Add 2.11 build configuratoin to travis ci * Create command which runs `safe` unit tests * Create command to test the scala 2.11 build * Update scalacheck to 1.11.4 * Update specs2 to 2.3.11 * Fix various 2.11/deprecation removals and other changes. Fix eval test failure in scala 2.11 with XML not existing.
This commit is contained in:
@@ -51,8 +51,12 @@ object LocksTest extends Properties("Locks") {
|
||||
(true /: forkWait(n)(impl))(_ && _)
|
||||
private def forkWait(n: Int)(impl: Int => Boolean): Iterable[Boolean] =
|
||||
{
|
||||
import scala.concurrent.ops.future
|
||||
val futures = (0 until n).map { i => future { impl(i) } }
|
||||
futures.toList.map(_())
|
||||
import scala.concurrent.Future
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration.Duration.Inf
|
||||
// TODO - Don't wait forever...
|
||||
val futures = (0 until n).map { i => Future { impl(i) } }
|
||||
futures.toList.map(f => Await.result(f, Inf))
|
||||
}
|
||||
}
|
||||
@@ -59,8 +59,8 @@ object ScalaProviderTest extends Specification {
|
||||
testResources.foreach(resource => touch(new File(resourceDirectory, resource.replace('/', File.separatorChar))))
|
||||
Array(resourceDirectory)
|
||||
}
|
||||
private def checkScalaLoader(version: String): Unit = withLauncher(checkLauncher(version, mapScalaVersion(version)))
|
||||
private def checkLauncher(version: String, versionValue: String)(launcher: Launcher): Unit =
|
||||
private def checkScalaLoader(version: String) = withLauncher(checkLauncher(version, mapScalaVersion(version)))
|
||||
private def checkLauncher(version: String, versionValue: String)(launcher: Launcher) =
|
||||
{
|
||||
val provider = launcher.getScala(version)
|
||||
val loader = provider.loader
|
||||
@@ -68,7 +68,7 @@ object ScalaProviderTest extends Specification {
|
||||
tryScala(loader)
|
||||
getScalaVersion(loader) must beEqualTo(versionValue)
|
||||
}
|
||||
private def tryScala(loader: ClassLoader): Unit = Class.forName("scala.Product", false, loader).getClassLoader must be(loader)
|
||||
private def tryScala(loader: ClassLoader) = Class.forName("scala.Product", false, loader).getClassLoader must be(loader)
|
||||
}
|
||||
object LaunchTest {
|
||||
def testApp(main: String): Application = testApp(main, Array[File]())
|
||||
|
||||
Reference in New Issue
Block a user