mirror of https://github.com/sbt/sbt.git
Bump up test frameworks used in scripted tests
This is in part to test these on JDK 11 by bumping tests to Scala 2.12.7.
This commit is contained in:
parent
18a0141fc0
commit
467d653efb
|
|
@ -99,8 +99,8 @@ object Dependencies {
|
|||
}
|
||||
|
||||
val jline = "jline" % "jline" % "2.14.6"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.4"
|
||||
val scalaCheck = "org.scalacheck" %% "scalacheck" % "1.13.4"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val scalacheck = "org.scalacheck" %% "scalacheck" % "1.14.0"
|
||||
val specs2 = "org.specs2" %% "specs2-junit" % "4.0.1"
|
||||
val junit = "junit" % "junit" % "4.11"
|
||||
val templateResolverApi = "org.scala-sbt" % "template-resolver" % "0.1"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ object NightlyPlugin extends AutoPlugin {
|
|||
|
||||
def testDependencies = libraryDependencies ++= (
|
||||
if (includeTestDependencies.value)
|
||||
Seq(scalaCheck % Test, specs2 % Test, junit % Test, scalatest % Test)
|
||||
Seq(scalacheck % Test, specs2 % Test, junit % Test, scalatest % Test)
|
||||
else Seq()
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,27 @@
|
|||
// https://github.com/sbt/sbt/issues/1730
|
||||
lazy val check = taskKey[Unit]("Runs the check")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val junit = "junit" % "junit" % "4.11"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
def commonSettings: Seq[Def.Setting[_]] =
|
||||
Seq(
|
||||
ivyPaths := IvyPaths( (baseDirectory in ThisBuild).value, Some((baseDirectory in LocalRootProject).value / "ivy-cache")),
|
||||
dependencyCacheDirectory := (baseDirectory in LocalRootProject).value / "dependency",
|
||||
scalaVersion := "2.11.4",
|
||||
resolvers += Resolver.sonatypeRepo("snapshots")
|
||||
)
|
||||
|
||||
lazy val transitiveTest = project.
|
||||
settings(
|
||||
commonSettings,
|
||||
libraryDependencies += "junit" % "junit" % "4.11" % Test
|
||||
libraryDependencies += junit % Test
|
||||
)
|
||||
|
||||
lazy val transitiveTestDefault = project.
|
||||
settings(
|
||||
commonSettings,
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.1"
|
||||
libraryDependencies += scalatest
|
||||
)
|
||||
|
||||
lazy val a = project.
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
scalaVersion := "2.10.6"
|
||||
libraryDependencies ++= Seq(
|
||||
"org.scalatest" %% "scalatest" % "1.9.1" % "test",
|
||||
"org.scalamock" %% "scalamock-scalatest-support" % "3.0" % "test"
|
||||
)
|
||||
|
|
@ -1 +0,0 @@
|
|||
conflictWarning ~= { _.copy(failOnConflict = false) }
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
-> update
|
||||
$ copy-file changes/no-conflict-error.sbt no-conflict-error.sbt
|
||||
|
||||
> reload
|
||||
> update
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
val scalcheck = "org.scalacheck" %% "scalacheck" % "1.14.0"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion in ThisBuild := "2.11.8",
|
||||
name := "forked-test",
|
||||
organization := "org.example",
|
||||
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.0" % Test
|
||||
libraryDependencies += scalcheck % Test
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
scalaVersion := "2.10.6"
|
||||
libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.0.M6-SNAP28" % "test"
|
||||
|
||||
|
||||
testOptions in Configurations.Test ++= {
|
||||
def args(path: String, args: String*): Seq[TestOption] = if(file(path).exists) Tests.Argument(args : _*) :: Nil else Nil
|
||||
//
|
||||
args("success1", "-n", "test2 test3") ++
|
||||
args("success2", "-n", "test2") ++
|
||||
args("success3", "-n", "test3") ++
|
||||
args("failure1", "-n", "test1") ++
|
||||
args("failure2", "-n", "test1 test4") ++
|
||||
args("failure3", "-n", "test1 test3")
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
import org.scalatest.fixture.FunSuite
|
||||
import org.scalatest.Tag
|
||||
|
||||
class ArgumentTest extends FunSuite{
|
||||
type FixtureParam = Map[String,Any]
|
||||
override def withFixture(test: OneArgTest) = {
|
||||
test(test.configMap)
|
||||
}
|
||||
test("1", Tag("test1")){ conf => sys.error("error #1") }
|
||||
test("2", Tag("test2")){ conf => () }
|
||||
test("3", Tag("test3")){ conf => () }
|
||||
test("4", Tag("test4")){ conf => sys.error("error #4") }
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# should fail because it should run all test:tests, some of which are expected to fail (1 and 4)
|
||||
-> test:test
|
||||
|
||||
$ touch success1
|
||||
> test:test
|
||||
$ delete success1
|
||||
|
||||
$ touch failure1
|
||||
-> test:test
|
||||
$ delete failure1
|
||||
|
||||
$ touch success2
|
||||
> test:test
|
||||
$ delete success2
|
||||
|
||||
$ touch failure2
|
||||
-> test:test
|
||||
$ delete failure2
|
||||
|
||||
$ touch success3
|
||||
> test:test
|
||||
$ delete success3
|
||||
|
||||
$ touch failure3
|
||||
-> test:test
|
||||
$ delete failure3
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.1"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
scalaVersion in ThisBuild := "2.11.8",
|
||||
libraryDependencies += scalatest % Test,
|
||||
// testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-f", "result.txt", "-eNDXEHLO")
|
||||
testOptions in Configurations.Test ++= {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
scalaVersion := "2.10.6"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += scalatest,
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
scalaVersion := "2.10.6"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += scalatest,
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
testFrameworks += new TestFramework("utest.runner.Framework")
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.12.6",
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += "com.lihaoyi" %% "utest" % "0.6.4" % Test,
|
||||
fork in Test := true
|
||||
testFrameworks += new TestFramework("utest.runner.Framework"),
|
||||
Test / fork := true
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import Tests._
|
||||
import Defaults._
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
val check = taskKey[Unit]("Check that tests are executed in parallel")
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.11.8",
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
|
||||
fork in Test := true,
|
||||
check := {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
scalaVersion in ThisBuild := "2.11.8"
|
||||
concurrentRestrictions in Global := Seq(Tags.limitAll(4))
|
||||
libraryDependencies += "org.specs2" %% "specs2-core" % "3.8.4" % Test
|
||||
val specs = "org.specs2" %% "specs2-core" % "4.3.4"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
Global / concurrentRestrictions := Seq(Tags.limitAll(4))
|
||||
libraryDependencies += specs % Test
|
||||
inConfig(Test)(Seq(
|
||||
testGrouping := {
|
||||
val home = javaHome.value
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
organization := "org.example"
|
||||
|
||||
name := "fork-uncaught"
|
||||
|
||||
fork := true
|
||||
|
||||
libraryDependencies ++= List(
|
||||
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
|
||||
"org.scalatest" %% "scalatest" % "2.2.6" % Test intransitive()
|
||||
)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package foo.test
|
||||
|
||||
object Foo { val foo = 5 }
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package foo.test
|
||||
|
||||
import org.scalatest.{FunSpec, ShouldMatchers}
|
||||
|
||||
class FooTest extends FunSpec with ShouldMatchers {
|
||||
|
||||
if(java.lang.Boolean.getBoolean("test.init.fail"))
|
||||
sys.error("exception during construction")
|
||||
|
||||
describe("Foo.foo should") {
|
||||
it("always return 5") {
|
||||
Foo.foo should equal (5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
> test
|
||||
> 'set javaOptions in Test += "-Dtest.init.fail=true"'
|
||||
-> test
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
scalaVersion := "2.11.8"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
libraryDependencies += "org.scala-sbt" % "test-interface" % "1.0"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,13 +5,17 @@ val groupSize = 3
|
|||
val groups = 3
|
||||
|
||||
val check = TaskKey[Unit]("check", "Check all files were created and remove them.")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val scalaxml = "org.scala-lang.modules" %% "scala-xml" % "1.1.1"
|
||||
|
||||
def groupId(idx: Int) = "group_" + (idx + 1)
|
||||
def groupPrefix(idx: Int) = groupId(idx) + "_file_"
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.11.8",
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
ThisBuild / organization := "org.example"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
testGrouping in Test := {
|
||||
val tests = (definedTests in Test).value
|
||||
assert(tests.size == 3)
|
||||
|
|
@ -33,7 +37,7 @@ lazy val root = (project in file(".")).
|
|||
},
|
||||
concurrentRestrictions := Tags.limit(Tags.ForkedTestGroup, 2) :: Nil,
|
||||
libraryDependencies ++= List(
|
||||
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
|
||||
"org.scalatest" %% "scalatest" % "2.2.6" % Test
|
||||
scalaxml,
|
||||
scalatest % Test
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
import org.scalatest.FlatSpec
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
import java.io.File
|
||||
|
||||
trait Ensemble extends FlatSpec with MustMatchers {
|
||||
trait Ensemble extends FlatSpec {
|
||||
def i: Int
|
||||
def prefix = System.getProperty("group.prefix")
|
||||
|
||||
"an ensemble" must "create all files" in {
|
||||
"an ensemble" should "create all files" in {
|
||||
val f = new File(prefix + i)
|
||||
f.createNewFile
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
scalaVersion := "2.10.6"
|
||||
fork := true
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "1.9" % "test"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
fork := true
|
||||
libraryDependencies += scalatest % Test
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import org.scalatest.FlatSpec
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
|
||||
class Test extends FlatSpec with MustMatchers {
|
||||
class Test extends FlatSpec {
|
||||
val v = Option(System.getenv("tests.max.value")) getOrElse Int.MaxValue
|
||||
"A simple equation" must "hold" in {
|
||||
Int.MaxValue must equal (v)
|
||||
"A simple equation" should "hold" in {
|
||||
assert(Int.MaxValue == v)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
lazy val root = (project in file(".")).
|
||||
configs(IntegrationTest).
|
||||
settings(
|
||||
scalaVersion := "2.10.6",
|
||||
Defaults.itSettings,
|
||||
libraryDependencies += specs
|
||||
)
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val specs = "org.specs2" % "specs2_2.10" % "1.12.3" % IntegrationTest
|
||||
val specs = "org.specs2" %% "specs2-core" % "4.3.4"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.configs(IntegrationTest)
|
||||
.settings(
|
||||
Defaults.itSettings,
|
||||
libraryDependencies += specs % IntegrationTest
|
||||
)
|
||||
|
|
|
|||
|
|
@ -11,11 +11,15 @@ val failingReportFile = "target/test-reports/another.pkg.FailingTest.xml"
|
|||
val flatSuiteReportFile = "target/test-reports/my.scalatest.MyFlatSuite.xml"
|
||||
val nestedSuitesReportFile = "target/test-reports/my.scalatest.MyNestedSuites.xml"
|
||||
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val junitinterface = "com.novocode" % "junit-interface" % "0.11"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.11.8",
|
||||
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.6" % Test,
|
||||
libraryDependencies += junitinterface % Test,
|
||||
libraryDependencies += scalatest % Test,
|
||||
// TODO use matchers instead of sys.error
|
||||
checkReport := {
|
||||
val oneSecondReport = XML.loadFile(oneSecondReportFile)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
scalaVersion := "2.10.6"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
|
||||
parallelExecution in Test := true
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += scalatest,
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter"),
|
||||
Test / parallelExecution := true
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
scalaVersion := "2.10.6"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
|
||||
parallelExecution in Test := false
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += scalatest,
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter"),
|
||||
Test / parallelExecution := false
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.11.8",
|
||||
libraryDependencies ++= List(
|
||||
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
|
||||
"org.scalatest" %% "scalatest" % "2.2.6"
|
||||
),
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter"),
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val scalaxml = "org.scala-lang.modules" %% "scala-xml" % "1.1.1"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies ++= List(scalatest, scalaxml),
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter"),
|
||||
fork := true
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.5" % "test"
|
||||
val scalcheck = "org.scalacheck" %% "scalacheck" % "1.14.0"
|
||||
|
||||
version := "0.0.1"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "org.catastrophe"
|
||||
|
||||
libraryDependencies += scalcheck % Test
|
||||
name := "broken"
|
||||
organization := "org.catastrophe"
|
||||
//scalaVersion := "2.10.6"
|
||||
scalaVersion := "2.12.3"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
scalaVersion := "2.10.2"
|
||||
|
||||
libraryDependencies += "com.novocode" % "junit-interface" % "0.10-M4" % "test"
|
||||
|
||||
libraryDependencies += "org.specs2" %% "specs2" % "2.1.1" % "test"
|
||||
|
||||
val specsJunit = "org.specs2" %% "specs2-junit" % "4.3.4"
|
||||
val junitinterface = "com.novocode" % "junit-interface" % "0.11"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
libraryDependencies += junitinterface % Test
|
||||
libraryDependencies += specsJunit % Test
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
scalaVersion in ThisBuild := "2.11.8"
|
||||
parallelExecution in Test := false
|
||||
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.10.0" % Test
|
||||
val scalcheck = "org.scalacheck" %% "scalacheck" % "1.14.0"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
Test / parallelExecution := false
|
||||
libraryDependencies += scalcheck % Test
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
scalaVersion := "2.10.6"
|
||||
libraryDependencies += "org.specs2" % "specs2_2.10" % "1.12.3" % "test"
|
||||
val specs = "org.specs2" %% "specs2-core" % "4.3.4"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
libraryDependencies += specs % Test
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
import sbt.internal.inc.ScalaInstance
|
||||
|
||||
lazy val OtherScala = config("other-scala").hide
|
||||
lazy val junitinterface = "com.novocode" % "junit-interface" % "0.11"
|
||||
lazy val akkaActor = "com.typesafe.akka" %% "akka-actor" % "2.5.17"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.configs(OtherScala)
|
||||
.settings(
|
||||
scalaVersion := "2.11.11",
|
||||
libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.11.11" % OtherScala.name,
|
||||
libraryDependencies += {
|
||||
"org.scala-lang" % "scala-compiler" % scalaVersion.value % OtherScala.name
|
||||
},
|
||||
managedClasspath in OtherScala := Classpaths.managedJars(OtherScala, classpathTypes.value, update.value),
|
||||
|
||||
// Hack in the scala instance
|
||||
|
|
@ -14,7 +18,7 @@ lazy val root = (project in file("."))
|
|||
val rawJars = (managedClasspath in OtherScala).value.map(_.data)
|
||||
val scalaHome = (target.value / "scala-home")
|
||||
def removeVersion(name: String): String =
|
||||
name.replaceAll("\\-2.11.11", "")
|
||||
name.replaceAll("\\-2.12.7", "")
|
||||
for(jar <- rawJars) {
|
||||
val tjar = scalaHome / s"lib/${removeVersion(jar.getName)}"
|
||||
IO.copyFile(jar, tjar)
|
||||
|
|
@ -23,8 +27,8 @@ lazy val root = (project in file("."))
|
|||
ScalaInstance(scalaHome, appConfiguration.value.provider.scalaProvider.launcher)
|
||||
},
|
||||
|
||||
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
|
||||
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.3" % Test,
|
||||
libraryDependencies += junitinterface % Test,
|
||||
libraryDependencies += akkaActor % Test,
|
||||
|
||||
scalaModuleInfo := {
|
||||
val old = scalaModuleInfo.value
|
||||
|
|
|
|||
|
|
@ -1,27 +1,29 @@
|
|||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
ThisBuild / organization := "com.example"
|
||||
ThisBuild / version := "0.0.1-SNAPSHOT"
|
||||
|
||||
val commonSettings = Seq(
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "1.9.1" % Test
|
||||
libraryDependencies += scalatest % Test
|
||||
)
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
aggregate(sub1, sub2).
|
||||
settings(inThisBuild(List(
|
||||
organization := "com.example",
|
||||
version := "0.0.1-SNAPSHOT",
|
||||
scalaVersion := "2.10.6"
|
||||
)),
|
||||
lazy val root = (project in file("."))
|
||||
.aggregate(sub1, sub2)
|
||||
.settings(
|
||||
commonSettings
|
||||
)
|
||||
|
||||
lazy val rootRef = LocalProject("root")
|
||||
|
||||
lazy val sub1 = project.
|
||||
dependsOn(rootRef).
|
||||
settings(
|
||||
lazy val sub1 = project
|
||||
.dependsOn(rootRef)
|
||||
.settings(
|
||||
commonSettings
|
||||
)
|
||||
|
||||
lazy val sub2 = project.
|
||||
dependsOn(rootRef).
|
||||
settings(
|
||||
lazy val sub2 = project
|
||||
.dependsOn(rootRef)
|
||||
.settings(
|
||||
commonSettings
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
scalaVersion := "2.10.6"
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "1.9.1"
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
libraryDependencies += scalatest
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
import org.scalatest.FlatSpec
|
||||
import org.scalatest.matchers.MustMatchers
|
||||
import java.io.File
|
||||
|
||||
class CheckSetupCleanup extends FlatSpec with MustMatchers
|
||||
{
|
||||
class CheckSetupCleanup extends FlatSpec {
|
||||
val f = new File("setup")
|
||||
"setup file" must "exist" in {
|
||||
"setup file" should "exist" in {
|
||||
assert(f.exists, "Setup file didn't exist: " + f.getAbsolutePath)
|
||||
f.delete()
|
||||
}
|
||||
|
||||
val t = new File("tested")
|
||||
"cleanup file" must "not exist" in {
|
||||
"cleanup file" should "not exist" in {
|
||||
assert(!t.exists, "Cleanup file already existed: " + t.getAbsolutePath)
|
||||
t.createNewFile()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
scalaVersion := "2.10.6"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
libraryDependencies += scalatest
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
lazy val specs2 = "org.specs2" %% "specs2" % "2.3.11"
|
||||
scalaVersion := "2.11.8"
|
||||
val specs = "org.specs2" %% "specs2-core" % "4.3.4"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
libraryDependencies += specs2 % Test
|
||||
libraryDependencies += specs % Test
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ import java.io.{ CharArrayWriter, PrintWriter }
|
|||
|
||||
val marker = new File("marker")
|
||||
val check = TaskKey[Unit]("check", "Check correct error has been returned.")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val scalaxml = "org.scala-lang.modules" %% "scala-xml" % "1.1.1"
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
libraryDependencies ++= List(
|
||||
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
|
||||
"org.scalatest" %% "scalatest" % "2.2.6"
|
||||
),
|
||||
scalaVersion := "2.11.8",
|
||||
libraryDependencies ++= List(scalaxml, scalatest),
|
||||
fork := true,
|
||||
testListeners += new TestReportListener {
|
||||
def testEvent(event: TestEvent): Unit = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
scalaVersion := "2.10.6"
|
||||
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "2.0.M6-SNAP28"
|
||||
|
||||
testOptions in Test += Tests.Argument("-r", "custom.CustomReporter")
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
libraryDependencies += scalatest
|
||||
Test / testOptions += Tests.Argument("-C", "custom.CustomReporter")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.10.6",
|
||||
libraryDependencies += "org.scalatest" %% "scalatest" % "1.9.1" % Test,
|
||||
parallelExecution in test := false
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies += scalatest % Test,
|
||||
Test / parallelExecution := false
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
import java.io.File
|
||||
import org.scalatest.FlatSpec
|
||||
import org.scalatest.matchers.ShouldMatchers
|
||||
|
||||
class Test1 extends FlatSpec with ShouldMatchers {
|
||||
class Test1 extends FlatSpec {
|
||||
"a test" should "pass" in {
|
||||
new File("target/Test1.run").createNewFile()
|
||||
}
|
||||
}
|
||||
|
||||
class Test2 extends FlatSpec with ShouldMatchers {
|
||||
class Test2 extends FlatSpec {
|
||||
"a test" should "pass" in {
|
||||
new File("target/Test2.run").createNewFile()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
lazy val root = (project in file(".")).
|
||||
settings(
|
||||
scalaVersion := "2.11.8",
|
||||
libraryDependencies ++= List(
|
||||
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
|
||||
"org.scalatest" %% "scalatest" % "2.2.6"
|
||||
),
|
||||
parallelExecution in test := false
|
||||
val scalatest = "org.scalatest" %% "scalatest" % "3.0.5"
|
||||
val scalaxml = "org.scala-lang.modules" %% "scala-xml" % "1.1.1"
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
libraryDependencies ++= List(scalaxml, scalatest),
|
||||
Test / parallelExecution := false
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import sbt.internal.server.{ ServerHandler, ServerIntent }
|
||||
|
||||
ThisBuild / scalaVersion := "2.12.7"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
.settings(
|
||||
Global / serverLog / logLevel := Level.Debug,
|
||||
|
|
@ -20,5 +22,4 @@ lazy val root = (project in file("."))
|
|||
}),
|
||||
|
||||
name := "handshake",
|
||||
scalaVersion := "2.12.3",
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue