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:
Josh Suereth
2014-05-14 19:08:05 -04:00
parent 1d67d42da3
commit abffc3e1bd
11 changed files with 60 additions and 29 deletions
+7 -3
View File
@@ -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]())