From 3b8ee6d4a95eb417b9e4eb944afb8d36bc913e18 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 6 Apr 2010 00:42:50 +0000 Subject: Fix for the partest task to fail the build when... Fix for the partest task to fail the build when a test fails, and fixes for 2/3 of the quietly failing tests. I'm not quite sure what to do about the view ones, it doesn't look like a simple rename is going to cut it, so: review by odersky. --- test/files/jvm/interpreter.check | 2 +- test/files/neg/t2179.check | 4 ++-- test/files/pos/spec-List.scala | 2 +- test/files/pos/spec-arrays.scala | 6 +++--- test/files/run/t0017.check | 2 +- test/files/scalacheck/array.scala | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'test/files') diff --git a/test/files/jvm/interpreter.check b/test/files/jvm/interpreter.check index 03c773e2cb..b74ba1be0a 100644 --- a/test/files/jvm/interpreter.check +++ b/test/files/jvm/interpreter.check @@ -169,7 +169,7 @@ scala> res4: Array[_] = Array(2) scala> res5: Array[java.lang.String] = Array(abc, abc) -scala> res6: scala.collection.mutable.GenericArray[_] = GenericArray(1, 2) +scala> res6: scala.collection.mutable.ArraySeq[_] = ArraySeq(1, 2) scala> res7: Array[(_$1, _$1)] forSome { type _$1 } = Array((1,1), (2,2)) diff --git a/test/files/neg/t2179.check b/test/files/neg/t2179.check index 82860c5d71..aa94fabe1f 100644 --- a/test/files/neg/t2179.check +++ b/test/files/neg/t2179.check @@ -1,9 +1,9 @@ -t2179.scala:2: error: inferred type arguments [scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}] do not conform to method reduceLeft's type parameter bounds [B >: List[Double]] +t2179.scala:2: error: inferred type arguments [scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}}] do not conform to method reduceLeft's type parameter bounds [B >: List[Double]] (Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d)) ^ t2179.scala:2: error: type mismatch; found : (Any, Any) => scala.collection.immutable.IndexedSeq[Double] - required: (scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}}, List[Double]) => scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; def reverse: scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}; def dropRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def takeRight(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def slice(start: Int,end: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def take(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}; def drop(n: Int): scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]}} + required: (scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}}, List[Double]) => scala.collection.immutable.Seq[Double]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq[Any]]; protected def thisCollection: Seq[Double]{def companion: scala.collection.generic.GenericCompanion[Seq[Any]]}} (Nil:List[List[Double]]).reduceLeft((_: Any, _: Any) => Nil.indices.map(_ => 0d)) ^ two errors found diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala index 6a506aa4be..e49391f0e4 100644 --- a/test/files/pos/spec-List.scala +++ b/test/files/pos/spec-List.scala @@ -26,7 +26,7 @@ import annotation.tailrec sealed trait List[@specialized +A] extends LinearSeq[A] with Product with GenericTraversableTemplate[A, List] - with LinearSeqLike[A, List[A]] { + with LinearSeqOptimized[A, List[A]] { override def companion: GenericCompanion[List] = List import scala.collection.{Iterable, Traversable, Seq} diff --git a/test/files/pos/spec-arrays.scala b/test/files/pos/spec-arrays.scala index c1f253a39d..96c75dd8de 100644 --- a/test/files/pos/spec-arrays.scala +++ b/test/files/pos/spec-arrays.scala @@ -30,7 +30,7 @@ final class IntArray(arr: Array[Int]) extends AbsArray[Int] { def length: Int = arr.length } -final class GenericArray[T](arr: Array[T]) extends AbsArray[T] { +final class ArraySeq[T](arr: Array[T]) extends AbsArray[T] { def apply(idx: Int): T = arr(idx) def update(idx: Int, elem: T) = arr(idx) = elem def length: Int = arr.length @@ -96,7 +96,7 @@ class ScalaSpec2Test extends Test { } class ScalaWrapTest extends Test { - val arr: AbsArray[Int] = new GenericArray(new Array[Int](1000)) + val arr: AbsArray[Int] = new ArraySeq(new Array[Int](1000)) def sum(): Int = { var acc = 0 @@ -116,7 +116,7 @@ class ScalaWrapTest extends Test { } class ScalaGenTest extends Test { - val arr: AbsArray[Integer] = new GenericArray(new Array[Integer](1000)) + val arr: AbsArray[Integer] = new ArraySeq(new Array[Integer](1000)) for (i <- 0 until arr.length) arr(i) = new Integer(0) def sum(): Int = { diff --git a/test/files/run/t0017.check b/test/files/run/t0017.check index 86c5fe56a8..3a72142467 100644 --- a/test/files/run/t0017.check +++ b/test/files/run/t0017.check @@ -1 +1 @@ -Array(GenericArray(1, 3), GenericArray(2, 4)) +Array(ArraySeq(1, 3), ArraySeq(2, 4)) diff --git a/test/files/scalacheck/array.scala b/test/files/scalacheck/array.scala index 3801f581fb..03c0217180 100644 --- a/test/files/scalacheck/array.scala +++ b/test/files/scalacheck/array.scala @@ -4,7 +4,7 @@ import Gen._ import Arbitrary._ import util._ import Buildable._ -import scala.collection.mutable.GenericArray +import scala.collection.mutable.ArraySeq object Test extends Properties("Array") { /** At this moment the authentic scalacheck Array Builder/Arb bits are commented out. -- cgit v1.2.3