diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/run/arrays-2.check | 7 | ||||
-rw-r--r-- | test/pending/run/arrays-2.scala | 26 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/pending/run/arrays-2.check b/test/pending/run/arrays-2.check new file mode 100644 index 0000000000..ce28533c20 --- /dev/null +++ b/test/pending/run/arrays-2.check @@ -0,0 +1,7 @@ +a1=Array(3, 2, 1) +a1=[3,2,1] +a2=Array(0, 4, 2, 6) +a2=[0,4,2,6] +a2=[0,7,4,2,1,3,6,5] +a2=[0,1,2,3,4,5,6,7] +true diff --git a/test/pending/run/arrays-2.scala b/test/pending/run/arrays-2.scala new file mode 100644 index 0000000000..055616d98c --- /dev/null +++ b/test/pending/run/arrays-2.scala @@ -0,0 +1,26 @@ +//############################################################################ +// Arrays 2 +//############################################################################ +// $Id: $ + +//############################################################################ + +object Test extends Application { + val a1 = Array(1, 2, 3) + val a2 = Array(0, 7, 4, 2, 1, 3, 6, 5) + val a3 = new Array(1, 2, 3) // ticket #193 (VerifyError) + + def _toString[A](a: Array[A]) = a.mkString("[", ",", "]") + + // slice: see file slices.scala + println("a1=" + a1.reverse) + println("a1=" + _toString(a1.reverse)) + println("a2=" + a2.filter(_ % 2 == 0)) + println("a2=" + _toString(a2.filter(_ % 2 == 0))) + + println("a2=" + _toString(a2)) + util.Sorting.stableSort(a2) + println("a2=" + _toString(a2)) + + println(a1 deepEquals a3) +} |