diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/arrays.scala | 8 | ||||
-rw-r--r-- | test/files/run/colltest1.scala | 2 | ||||
-rw-r--r-- | test/files/run/multi-array.scala | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/arrays.scala b/test/files/run/arrays.scala index 8a2d96a2a7..e8a984dc1b 100644 --- a/test/files/run/arrays.scala +++ b/test/files/run/arrays.scala @@ -158,6 +158,12 @@ object Test { c(xs) } + def checkT2368() { + val arr = Array(1, 2, 3) + arr(0) += 1 + assert(arr(0) == 1) + } + //########################################################################## // Values @@ -919,6 +925,7 @@ object Test { checkZip checkConcat + checkT2368() //###################################################################### @@ -929,3 +936,4 @@ object Test { //########################################################################## } + diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala index 2fc8af2390..7069c052a5 100644 --- a/test/files/run/colltest1.scala +++ b/test/files/run/colltest1.scala @@ -127,6 +127,8 @@ object Test extends Application { assert(ten.patch(0, List(1, 2, 3), 9) == List(1, 2, 3, 10)) assert(empty.padTo(10, 7) == Array.fill(10)(7).toSequence) assert((ten zip ten.indices) == ten.zipWithIndex) + assert(ten sortWith (_ < _) == ten) + assert(ten sortWith (_ > _) == ten.reverse) } def setTest(empty: => Set[String]) { diff --git a/test/files/run/multi-array.scala b/test/files/run/multi-array.scala index 04538402f8..42f64751fd 100644 --- a/test/files/run/multi-array.scala +++ b/test/files/run/multi-array.scala @@ -10,4 +10,5 @@ object Test extends Application { for (i <- 0 until 3; j <- 0 until 3) aaiComplete(i)(j) = i + j println(aaiComplete.deepToString) + assert(aaiComplete.last.last == 4) } |