diff options
author | Martin Odersky <odersky@gmail.com> | 2010-04-06 13:53:39 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-04-06 13:53:39 +0000 |
commit | e0cf98dd424980a8d6d93af7650ba75c835b80bc (patch) | |
tree | 5f6b70d06f33a7a18dc4ac014df0025863f0cc94 /test | |
parent | a292a87fc5b6145ea3a790780c0d24c83375b228 (diff) | |
download | scala-e0cf98dd424980a8d6d93af7650ba75c835b80bc.tar.gz scala-e0cf98dd424980a8d6d93af7650ba75c835b80bc.tar.bz2 scala-e0cf98dd424980a8d6d93af7650ba75c835b80bc.zip |
Optimized toArray for ArrayOps and WrappedArrays.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/colltest1.check | 8 | ||||
-rw-r--r-- | test/files/run/t2074_2.check | 6 | ||||
-rw-r--r-- | test/files/run/t2074_2.scala | 5 | ||||
-rw-r--r-- | test/files/run/viewtest.check | 12 | ||||
-rwxr-xr-x | test/files/run/viewtest.scala | 2 |
5 files changed, 14 insertions, 19 deletions
diff --git a/test/files/run/colltest1.check b/test/files/run/colltest1.check index a5f4ada7a3..7377174281 100644 --- a/test/files/run/colltest1.check +++ b/test/files/run/colltest1.check @@ -72,11 +72,11 @@ 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) +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 -IndexedSeq(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) +Vector(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) diff --git a/test/files/run/t2074_2.check b/test/files/run/t2074_2.check index eb1f072de3..e4fc89b1ce 100644 --- a/test/files/run/t2074_2.check +++ b/test/files/run/t2074_2.check @@ -1,3 +1,3 @@ -IndexedSeqView(1, 2, 3) -IndexedSeqView(1, 2, 3) -IndexedSeqViewZ((1,1), (2,2), (3,3)) +SeqView(1, 2, 3) +SeqView(1, 2, 3) +SeqViewZ(...) diff --git a/test/files/run/t2074_2.scala b/test/files/run/t2074_2.scala index 4999552cc4..4624170f89 100644 --- a/test/files/run/t2074_2.scala +++ b/test/files/run/t2074_2.scala @@ -1,14 +1,15 @@ // replaced all occurrences of 'Vector' with 'IndexedSeq' import scala.collection.immutable.IndexedSeq -import scala.collection.IndexedSeqView +import scala.collection.SeqView object Test { val funWithCCE = List.range(1,11).view.patch(5, List(100,101), 2) - val v = new IndexedSeqView[Int, IndexedSeq[Int]] { + val v = new SeqView[Int, IndexedSeq[Int]] { def underlying = IndexedSeq(1,2,3) def apply(idx: Int) = underlying(idx) def length = underlying.length + def iterator = underlying.iterator } val w = IndexedSeq(1, 2, 3).view diff --git a/test/files/run/viewtest.check b/test/files/run/viewtest.check index ded3ac0e92..6e0fe81a67 100644 --- a/test/files/run/viewtest.check +++ b/test/files/run/viewtest.check @@ -1,17 +1,11 @@ -SeqViewZ((x,0)) +SeqViewZ(...) ys defined mapping 1 2 -mapping 1 -mapping 2 -mapping 3 -SeqViewMS(3, 4) +SeqViewMS(...) mapping 3 4 -mapping 1 -mapping 2 -mapping 3 -SeqViewM(2, 3, 4) +SeqViewM(...) mapping 1 mapping 2 mapping 3 diff --git a/test/files/run/viewtest.scala b/test/files/run/viewtest.scala index 280ded57cf..833c0101e3 100755 --- a/test/files/run/viewtest.scala +++ b/test/files/run/viewtest.scala @@ -13,7 +13,7 @@ object Test extends Application { println(ys.force) val zs = Array(1, 2, 3).view - val as: IndexedSeqView[Int, Array[Int]] = zs map (_ + 1) + val as: SeqView[Int, Array[Int]] = zs map (_ + 1) val bs: Array[Int] = as.force val cs = zs.reverse cs(0) += 1 |