diff --git a/src/test/resources/expected_output/rangepos/akka/cluster/ClusterRouterGroupSettings.java b/src/test/resources/expected_output/basic/akka/cluster/ClusterRouterGroupSettings.java similarity index 100% rename from src/test/resources/expected_output/rangepos/akka/cluster/ClusterRouterGroupSettings.java rename to src/test/resources/expected_output/basic/akka/cluster/ClusterRouterGroupSettings.java diff --git a/src/test/resources/input/rangepos/akka/cluster/ClusterRouterGroupSettings.scala b/src/test/resources/input/basic/akka/cluster/ClusterRouterGroupSettings.scala similarity index 100% rename from src/test/resources/input/rangepos/akka/cluster/ClusterRouterGroupSettings.scala rename to src/test/resources/input/basic/akka/cluster/ClusterRouterGroupSettings.scala diff --git a/src/test/scala/com/typesafe/genjavadoc/RangePosSpec.scala b/src/test/scala/com/typesafe/genjavadoc/RangePosSpec.scala deleted file mode 100644 index 37143b0..0000000 --- a/src/test/scala/com/typesafe/genjavadoc/RangePosSpec.scala +++ /dev/null @@ -1,18 +0,0 @@ -package com.typesafe.genjavadoc - -import java.io.File - -import com.typesafe.genjavadoc.util.CompilerSpec - -class RangePosSpec extends CompilerSpec { - /** Sources to compile. */ - override def sources: Seq[String] = Seq( - new File("src/test/resources/input/rangepos/akka/cluster/ClusterRouterGroupSettings.scala").getAbsolutePath - ) - - override def rangepos = true - - /** Root directory that contains expected Java output. */ - override def expectedPath: String = - new File("src/test/resources/expected_output/rangepos").getAbsolutePath -} diff --git a/src/test/scala/com/typesafe/genjavadoc/SignatureSpec.scala b/src/test/scala/com/typesafe/genjavadoc/SignatureSpec.scala index 3f70dcf..16e362d 100644 --- a/src/test/scala/com/typesafe/genjavadoc/SignatureSpec.scala +++ b/src/test/scala/com/typesafe/genjavadoc/SignatureSpec.scala @@ -60,7 +60,7 @@ class SignatureSpec { val scalac = new GenJavadocCompiler(Seq( s"genjavadoc:out=$docPath", "genjavadoc:suppressSynthetic=false" - ), rangepos = true) + )) val javaSources = expectedClasses.map{cls => docPath + "/" + cls.replace(".", "/") + ".java" diff --git a/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala b/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala index 2ba975c..2e5d201 100644 --- a/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala +++ b/src/test/scala/com/typesafe/genjavadoc/util/CompilerSpec.scala @@ -20,16 +20,13 @@ trait CompilerSpec { /** Extra plugin arguments. */ def extraSettings: Seq[String] = Seq.empty - /** whether to enable -Yrangepos */ - def rangepos: Boolean = true - @Test def compileSourcesAndGenerateExpectedOutput(): Unit = { val doc = IO.tempDir("java") val docPath = doc.getAbsolutePath val defaultSettings = Seq(s"out=$docPath", "suppressSynthetic=false") val scalac = new GenJavadocCompiler((defaultSettings ++ extraSettings).map{ kv => s"genjavadoc:$kv" - }, rangepos) + }) scalac.compile(sources) assertFalse("Scala compiler reported errors", scalac.reporter.hasErrors) diff --git a/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala b/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala index 9c767ee..80c0ea1 100644 --- a/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala +++ b/src/test/scala/com/typesafe/genjavadoc/util/GenJavaDocCompiler.scala @@ -9,12 +9,10 @@ import scala.tools.nsc.{Global, Settings} /** An instance of the Scala compiler with the genjavadoc plugin enabled * @param pluginOptions additional parameters to pass to the compiler */ -class GenJavadocCompiler(pluginOptions: Seq[String], rangepos: Boolean) { +class GenJavadocCompiler(pluginOptions: Seq[String]) { private val settings = new Settings - settings.Yrangepos.value = rangepos - val reporter = new ConsoleReporter(settings) private val global = new Global(settings, reporter) { override protected def loadRoughPluginsList() =