Skip to content

Commit 22ccfb1

Browse files
committed
Fixed failing test.
1 parent e79dc22 commit 22ccfb1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build.sbt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
1414

1515
scalaVersion := "2.11.0"
1616

17+
crossScalaVersions := Seq("2.10.4", "2.11.0")
18+
1719
libraryDependencies ++= Seq(
1820
"commons-io" % "commons-io" % "2.4",
19-
"org.scala-lang.modules" %% "scala-xml" % "1.0.1",
2021
"org.scalatest" %% "scalatest" % "2.1.6" % "test",
2122
"com.typesafe.scala-logging" %% "scala-logging-slf4j" % "2.1.2" % "test",
2223
"org.mockito" % "mockito-all" % "1.9.5" % "test",
@@ -29,6 +30,17 @@ libraryDependencies += {
2930
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"
3031
}
3132

33+
libraryDependencies := {
34+
CrossVersion.partialVersion(scalaVersion.value) match {
35+
case Some((2, scalaMajor)) if scalaMajor == 11 =>
36+
EnvSupport.setEnv("CrossBuildScalaVersion", "2.11.0")
37+
libraryDependencies.value :+ "org.scala-lang.modules" %% "scala-xml" % "1.0.1"
38+
case _ =>
39+
EnvSupport.setEnv("CrossBuildScalaVersion", "2.10.4")
40+
libraryDependencies.value
41+
}
42+
}
43+
3244
publishTo <<= version {
3345
(v: String) =>
3446
val nexus = "https://oss.sonatype.org/"

src/test/scala/scoverage/PluginCoverageTest.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class PluginCoverageTest
104104
addToClassPath("com.typesafe.scala-logging", "scala-logging-slf4j_" + shortScalaVersion, "2.1.2")
105105
compileCodeSnippet( """import com.typesafe.scalalogging.slf4j.StrictLogging
106106
|class MacroTest extends StrictLogging {
107-
| val name = "sammy"
108107
| logger.info("will break")
109108
|} """.stripMargin)
110109
assert(!reporter.hasErrors)

0 commit comments

Comments
 (0)