diff --git a/compile/src/test/scala/CompileTest.scala b/compile/src/test/scala/CompileTest.scala index 165307169..a1d46d29d 100644 --- a/compile/src/test/scala/CompileTest.scala +++ b/compile/src/test/scala/CompileTest.scala @@ -30,11 +30,16 @@ object CompileTest extends Specification WithFiles( new File("Test.scala") -> "object Test" ) { sources => withTemporaryDirectory { temp => val callback = new xsbti.TestCallback - compiler(sources, Nil, temp, Nil, callback, 10, log) + compiler(sources, noChanges, Nil, temp, Nil, callback, 10, CompilerCache.fresh, log) (callback.beganSources) must haveTheSameElementsAs(sources) } } } + val noChanges = new xsbti.compile.DependencyChanges { + def isEmpty = true + def modifiedBinaries = Array() + def modifiedClasses = Array() + } val UsingCompiler = "object Test { classOf[scala.tools.nsc.Global] }" diff --git a/compile/src/test/scala/TestCompile.scala b/compile/src/test/scala/TestCompile.scala index ea09a80a8..3b6c9d5cb 100644 --- a/compile/src/test/scala/TestCompile.scala +++ b/compile/src/test/scala/TestCompile.scala @@ -12,15 +12,12 @@ object TestCompile /** Tests running the compiler interface with the analyzer plugin with a test callback. The test callback saves all information * that the plugin sends it for post-compile analysis by the provided function.*/ def apply[T](scalaVersion: String, sources: Seq[File], outputDirectory: File, options: Seq[String]) - (f: (TestCallback, ScalaInstance, Logger) => T): T = + (f: (TestCallback, xsbti.compile.ScalaInstance, Logger) => T): T = { val testCallback = new TestCallback WithCompiler(scalaVersion) { (compiler, log) => - compiler(sources, Nil, outputDirectory, options, testCallback, 5, log) - val result = f(testCallback, compiler.scalaInstance, log) - for( (file, src) <- testCallback.apis ) - xsbt.api.APIUtil.verifyTypeParameters(src) - result + compiler(sources, CompileTest.noChanges, Nil, outputDirectory, options, testCallback, 5, CompilerCache.fresh, log) + f(testCallback, compiler.scalaInstance, log) } } /** Tests running the compiler interface with the analyzer plugin. The provided function is given a ClassLoader that can @@ -32,7 +29,7 @@ object CallbackTest { def simple[T](scalaVersion: String, sources: Seq[File])(f: TestCallback => T): T = full(scalaVersion, sources){ case (callback, _, _, _) => f(callback) } - def full[T](scalaVersion: String, sources: Seq[File])(f: (TestCallback, File, ScalaInstance, Logger) => T): T = + def full[T](scalaVersion: String, sources: Seq[File])(f: (TestCallback, File, xsbti.compile.ScalaInstance, Logger) => T): T = withTemporaryDirectory { outputDir => TestCompile(scalaVersion, sources, outputDir, Nil) { case (callback, instance, log) => f(callback, outputDir, instance, log) } } diff --git a/interface/src/test/scala/TestCallback.scala b/interface/src/test/scala/TestCallback.scala index 95fcbf96c..096d73a83 100644 --- a/interface/src/test/scala/TestCallback.scala +++ b/interface/src/test/scala/TestCallback.scala @@ -20,5 +20,5 @@ class TestCallback extends AnalysisCallback def endSource(source: File) { endedSources += source } def api(source: File, sourceAPI: xsbti.api.SourceAPI) { apis += ((source, sourceAPI)) } - def problem(pos: xsbti.Position, message: String, severity: xsbti.Severity, reported: Boolean) {} + def problem(category: String, pos: xsbti.Position, message: String, severity: xsbti.Severity, reported: Boolean) {} } \ No newline at end of file diff --git a/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt b/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt index d95ea6d23..a5982f901 100644 --- a/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt +++ b/sbt/src/sbt-test/source-dependencies/inherited_type_params/build.sbt @@ -2,7 +2,6 @@ name := "test" TaskKey[Unit]("check-same") <<= compile in Configurations.Compile map { analysis => analysis.apis.internal foreach { case (_, api) => - assert( xsbt.api.APIUtil.verifyTypeParameters(api.api) ) assert( xsbt.api.SameAPI(api.api, api.api) ) } } \ No newline at end of file