summaryrefslogtreecommitdiff
path: root/test/files/run/arrays.scala
diff options
context:
space:
mode:
authorLex Spoon <lex@lexspoon.org>2008-03-09 14:58:33 +0000
committerLex Spoon <lex@lexspoon.org>2008-03-09 14:58:33 +0000
commitd817beea39b06c0b55fee8fa2b847b30dbe7c8c7 (patch)
tree8aff8f81864e73f5a3b54e25b4abce267f213bdb /test/files/run/arrays.scala
parent6131229601dd780870c524a870491930ae57d7f9 (diff)
downloadscala-d817beea39b06c0b55fee8fa2b847b30dbe7c8c7.tar.gz
scala-d817beea39b06c0b55fee8fa2b847b30dbe7c8c7.tar.bz2
scala-d817beea39b06c0b55fee8fa2b847b30dbe7c8c7.zip
Array.zip supports arrays of different lengths.
Diffstat (limited to 'test/files/run/arrays.scala')
-rw-r--r--test/files/run/arrays.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala
index 5fcc5e6614..927112d851 100644
--- a/test/files/run/arrays.scala
+++ b/test/files/run/arrays.scala
@@ -336,6 +336,14 @@ object Test {
}
//##########################################################################
+ // Miscellaneous checks
+ def checkZip(): Unit = {
+ val zipped = Array("a", "b", "c").zip(Array(1, 2))
+ val expected = Array(("a",1), ("b",2))
+ check(zipped sameElements expected, zipped.toList, expected.toList)
+ }
+
+ //##########################################################################
// Arrays
val uarray: Array[Unit ] = Array(u0, u1);
@@ -903,6 +911,10 @@ object Test {
//######################################################################
+ checkZip()
+
+ //######################################################################
+
println("checks: " + checks)
//######################################################################