summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTiark Rompf <tiark.rompf@epfl.ch>2009-10-30 07:51:23 +0000
committerTiark Rompf <tiark.rompf@epfl.ch>2009-10-30 07:51:23 +0000
commit6f7723bea494da2616edc1877d2402d356787512 (patch)
tree071153dbb7d28cfcdf4c9cc69d8a1f41593fcfcd /test
parent6ae7f2cbc183d57ba7d00fe790889f359c7b3a11 (diff)
downloadscala-6f7723bea494da2616edc1877d2402d356787512.tar.gz
scala-6f7723bea494da2616edc1877d2402d356787512.tar.bz2
scala-6f7723bea494da2616edc1877d2402d356787512.zip
separated Vector impl from IndexedSeq
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/collectGenericCC.scala2
-rw-r--r--test/files/pos/spec-List.scala4
-rw-r--r--test/files/run/colltest1.check10
-rw-r--r--test/files/run/colltest1.scala2
4 files changed, 15 insertions, 3 deletions
diff --git a/test/files/pos/collectGenericCC.scala b/test/files/pos/collectGenericCC.scala
index 0195993154..9840f1071d 100644
--- a/test/files/pos/collectGenericCC.scala
+++ b/test/files/pos/collectGenericCC.scala
@@ -8,7 +8,7 @@ object Test {
b.result
}
- collect[Int, IndexedSeq[Int]](List(1,2,3,4))
+ collect[Int, Vector[Int]](List(1,2,3,4))
collect[Char, String](List('1','2','3','4'))
collect[Char, Array[Char]](List('1','2','3','4'))
} \ No newline at end of file
diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala
index 039599eb00..17291fae56 100644
--- a/test/files/pos/spec-List.scala
+++ b/test/files/pos/spec-List.scala
@@ -29,7 +29,7 @@ sealed abstract class List[@specialized +A] extends LinearSeq[A]
with LinearSeqLike[A, List[A]] {
override def companion: GenericCompanion[List] = List
- import scala.collection.{Iterable, Traversable, Seq, IndexedSeq}
+ import scala.collection.{Iterable, Traversable, Seq}
/** Returns true if the list does not contain any elements.
* @return <code>true</code>, iff the list is empty.
@@ -494,7 +494,7 @@ final case class ::[@specialized B](private var hd: B, private[scala] var tl: Li
*/
object List extends SeqFactory[List] {
- import collection.{Iterable, Seq, IndexedSeq}
+ import collection.{Iterable, Seq}
implicit def builderFactory[A]: CanBuildFrom[Coll, A, List[A]] =
new GenericCanBuildFrom[A] {
diff --git a/test/files/run/colltest1.check b/test/files/run/colltest1.check
index b76a7f324a..b49d328be4 100644
--- a/test/files/run/colltest1.check
+++ b/test/files/run/colltest1.check
@@ -72,6 +72,16 @@ new test starting with List()
9: List(2, 3, 4, 5, 6, 7, 8, 9, 10)
1
List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+new test starting with IndexedSeq()
+10: IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+9: IndexedSeq(2, 3, 4, 5, 6, 7, 8, 9, 10)
+1
+IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+new test starting with Vector()
+10: Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+9: Vector(2, 3, 4, 5, 6, 7, 8, 9, 10)
+1
+Vector(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
new test starting with List()
10: List(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
9: List(2, 3, 4, 5, 6, 7, 8, 9, 10)
diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala
index 1ce73396f0..081522d3f6 100644
--- a/test/files/run/colltest1.scala
+++ b/test/files/run/colltest1.scala
@@ -213,6 +213,8 @@ object Test extends Application {
sequenceTest(mutable.Seq())
sequenceTest(immutable.Seq())
sequenceTest(LinearSeq())
+ sequenceTest(IndexedSeq())
+ sequenceTest(Vector())
// sequenceTest(mutable.LinearSeq())
sequenceTest(immutable.LinearSeq())
sequenceTest(mutable.IndexedSeq())