Skip to content

Commit

Permalink
Merge pull request #11 from retronym/topic/sbt-junit
Browse files Browse the repository at this point in the history
Add Junit interface plugin to support 'sbt test'
  • Loading branch information
gkossakowski committed Mar 16, 2015
2 parents 1e20c21 + b42f1b4 commit 4a9955c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ val scalaParserCombinatorsDep = "org.scala-lang.modules" %% "scala-parser-combin
val scalaXmlDep = "org.scala-lang.modules" %% "scala-xml" % versionNumber("scala-xml") exclude("org.scala-lang", "scala-library")
val partestDep = "org.scala-lang.modules" %% "scala-partest" % versionNumber("partest") exclude("org.scala-lang", "scala-library")
val junitDep = "junit" % "junit" % "4.11"
val junitIntefaceDep = "com.novocode" % "junit-interface" % "0.11" % "test"
val jlineDep = "jline" % "jline" % versionProps("jline.version")
val antDep = "org.apache.ant" % "ant" % "1.9.4"

Expand Down Expand Up @@ -223,7 +224,9 @@ lazy val junit = project.in(file("test") / "junit")
.settings(
scalaVersion := bootstrapScalaVersion,
ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) },
libraryDependencies += junitDep,
fork in Test := true,
libraryDependencies ++= Seq(junitDep, junitIntefaceDep),
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
unmanagedSourceDirectories in Test := List(baseDirectory.value)
)

Expand Down
1 change: 0 additions & 1 deletion test/junit/scala/collection/mutable/VectorTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class VectorTest {
def iteratorCat() {
def its = vecs.map(_.toList.toIterator)
val cats = vecs.map(a => its.map(a ++ _))
println(cats)
assert( cats == ans )
}

Expand Down
3 changes: 2 additions & 1 deletion test/junit/scala/tools/nsc/backend/jvm/CodeGenTools.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import scala.tools.asm.Opcodes
import scala.tools.asm.tree.{AbstractInsnNode, LabelNode, ClassNode, MethodNode}
import scala.tools.cmd.CommandLineParser
import scala.tools.nsc.backend.jvm.opt.LocalOpt
import scala.tools.nsc.reporters.StoreReporter
import scala.tools.nsc.settings.{MutableSettings, ScalaSettings}
import scala.tools.nsc.{Settings, Global}
import scala.tools.partest.ASMConverters
Expand Down Expand Up @@ -43,7 +44,7 @@ object CodeGenTools {
val settings = new Settings()
val args = (CommandLineParser tokenize defaultArgs) ++ (CommandLineParser tokenize extraArgs)
settings.processArguments(args, processAll = true)
val compiler = new Global(settings)
val compiler = new Global(settings, new StoreReporter)
resetOutput(compiler)
compiler
}
Expand Down

0 comments on commit 4a9955c

Please sign in to comment.