From e5b3b577d83a7a6a5ee7707540dcf374e5725700 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 18 Oct 2009 18:03:31 -0400 Subject: [PATCH] Fix some tests and open up some analysis-related classes --- src/main/scala/sbt/Analysis.scala | 6 +++--- .../module-confs/project/build/Test.scala | 2 +- src/sbt-test/tests/specs-a/changes/BasicTest.scala | 5 ++--- src/sbt-test/tests/specs-a/changes/FailTest.scala | 4 ++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/scala/sbt/Analysis.scala b/src/main/scala/sbt/Analysis.scala index 898249b26..45fbee1e7 100644 --- a/src/main/scala/sbt/Analysis.scala +++ b/src/main/scala/sbt/Analysis.scala @@ -34,7 +34,7 @@ import BasicAnalysis._ import impl.MapUtilities.{add, all, read, mark, readOnlyIterable, write} import scala.collection.mutable.{HashMap, HashSet, ListBuffer, Map, Set} -sealed class BasicAnalysis(analysisPath: Path, projectPath: Path, log: Logger) extends TaskAnalysis[Path, Path, File] +class BasicAnalysis(analysisPath: Path, projectPath: Path, log: Logger) extends TaskAnalysis[Path, Path, File] { private val sourceDependencyMap: Map[Path, Set[Path]] = new HashMap private val productMap: Map[Path, Set[Path]] = new HashMap @@ -161,7 +161,7 @@ object CompileAnalysis } import CompileAnalysis._ import Format._ // get implicits for data types -sealed class BasicCompileAnalysis protected (analysisPath: Path, projectPath: Path, log: Logger) extends BasicAnalysis(analysisPath, projectPath, log) +class BasicCompileAnalysis protected (analysisPath: Path, projectPath: Path, log: Logger) extends BasicAnalysis(analysisPath, projectPath, log) { /*private */val hashesMap = new HashMap[Path, Array[Byte]] @@ -196,7 +196,7 @@ private[sbt] final class BuilderCompileAnalysis(analysisPath: Path, projectPath: Backed(projectDefinitionMap, ProjectDefinitionsLabel, ProjectDefinitionsName) :: super.backedMaps } -final class CompileAnalysis(analysisPath: Path, projectPath: Path, log: Logger) extends BasicCompileAnalysis(analysisPath, projectPath, log) +class CompileAnalysis(analysisPath: Path, projectPath: Path, log: Logger) extends BasicCompileAnalysis(analysisPath, projectPath, log) { private val testMap = new HashMap[Path, Set[TestDefinition]] private val applicationsMap = new HashMap[Path, Set[String]] diff --git a/src/sbt-test/dependency-management/module-confs/project/build/Test.scala b/src/sbt-test/dependency-management/module-confs/project/build/Test.scala index a19879906..c1ea79b6e 100644 --- a/src/sbt-test/dependency-management/module-confs/project/build/Test.scala +++ b/src/sbt-test/dependency-management/module-confs/project/build/Test.scala @@ -9,6 +9,6 @@ class Test(info: ProjectInfo) extends DefaultProject(info) def scalaSnapshots = Resolver.url("Scala Tools Snapshots") artifacts(snapshotPattern) ivys(snapshotPattern) mavenStyle() val scOnly = ModuleConfiguration("org.scala-lang", "*", "2.8.0-.*", scalaSnapshots) - val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20090910.003346-219" + val uniqueScala = "org.scala-lang" % "scala-compiler" % "2.8.0-20091017.011744-240" val otherDep = "org.scala-tools.sxr" % "sxr_2.7.5" % "0.2.3" } \ No newline at end of file diff --git a/src/sbt-test/tests/specs-a/changes/BasicTest.scala b/src/sbt-test/tests/specs-a/changes/BasicTest.scala index fc0834d27..6c6d4ac8f 100755 --- a/src/sbt-test/tests/specs-a/changes/BasicTest.scala +++ b/src/sbt-test/tests/specs-a/changes/BasicTest.scala @@ -27,10 +27,9 @@ abstract class AbstractNotATest extends Specification } } -class ClassNotATest extends Specification +class ClassCanBeATest extends Specification { - // would fail if called "'hello world' has 11 characters" in { - "hello world".size mustEqual 12 + "hello world".size mustEqual 11 } } \ No newline at end of file diff --git a/src/sbt-test/tests/specs-a/changes/FailTest.scala b/src/sbt-test/tests/specs-a/changes/FailTest.scala index 8df53ef80..b55799891 100755 --- a/src/sbt-test/tests/specs-a/changes/FailTest.scala +++ b/src/sbt-test/tests/specs-a/changes/FailTest.scala @@ -27,10 +27,10 @@ object FailTest extends Specification } } -class ClassNotATest extends Specification +class ClassCanBeATest extends Specification { // would fail if called "'hello world' has 11 characters" in { - "hello world".size mustEqual 12 + "hello world".size mustEqual 11 } } \ No newline at end of file