Skip to content

Commit 3a317ae

Browse files
committed
Adapt/remove tests for the 2.13 stdlib.
All these changes come from the scala repo, most of them just remove tests related to the parallel collections which are no longer part of the stdlib.
1 parent 779c8d4 commit 3a317ae

20 files changed

+6
-374
lines changed

tests/neg/equality.scala

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,5 @@ object equality {
119119
s1 == Nil // error
120120
Nil == s2 // error
121121
s2 == Nil // error
122-
123-
import collection.parallel._
124-
val p1 = ParSeq(1, 2, 3)
125-
val p2 = ParSeq()
126-
Nil == p1 // OK
127-
p1 == Nil // OK
128-
Nil == p2 // OK
129-
p2 == Nil // Ok
130-
131122
}
132123
}

tests/pos/sudoku.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import scala.io.StdIn.readLine
2+
13
object SudokuSolver extends App {
24
// The board is represented by an array of strings (arrays of chars),
35
// held in a global variable m. The program begins by reading 9 lines

tests/run/array-charSeq.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import runtime.ArrayCharSequence
2+
13
object Test {
24
val arr = Array[Char]('a' to 'i': _*)
3-
var xs: CharSequence = arr
5+
var xs: CharSequence = new runtime.ArrayCharSequence(arr, 0, arr.length)
46
val hash = xs.hashCode
57

68
def check(chars: CharSequence): Unit = {
79
println("\n[check '" + chars + "'] len = " + chars.length)
810
chars match {
9-
case x: Predef.ArrayCharSequence => assert(x.__arrayOfChars eq arr, ((x.__arrayOfChars, arr)))
1011
case x: runtime.ArrayCharSequence => assert(x.xs eq arr, ((x.xs, arr)))
1112
case x => assert(false, x)
1213
}

tests/run/equality.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// a quickly assembled test of equality. Needs work.
22
object Test
33
{
4-
import scala.runtime.ScalaRunTime.hash
4+
def hash(x: Any): Int = x.## // forces upcast to Any
55

66
def makeFromInt(x: Int) = List(
77
x.toByte, x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x)

tests/run/hashset.scala

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/run/parmap-ops.scala

Lines changed: 0 additions & 48 deletions
This file was deleted.

tests/run/pc-conversions.scala

Lines changed: 0 additions & 94 deletions
This file was deleted.

tests/run/t3647.scala

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/run/t4608.scala

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/run/t4723.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/run/t4761.scala

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/run/t4894.scala

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/run/t4895.scala

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/run/t6052.scala

Lines changed: 0 additions & 21 deletions
This file was deleted.

tests/run/t6410.scala

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/run/t6467.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/run/t6908.scala

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)