Skip to content

Commit

Permalink
Adapt/remove tests for the 2.13 stdlib.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
smarter committed Aug 8, 2019
1 parent f823455 commit 40c9fee
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 374 deletions.
9 changes: 0 additions & 9 deletions tests/neg/equality.scala
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,5 @@ object equality {
s1 == Nil // error
Nil == s2 // error
s2 == Nil // error

import collection.parallel._
val p1 = ParSeq(1, 2, 3)
val p2 = ParSeq()
Nil == p1 // OK
p1 == Nil // OK
Nil == p2 // OK
p2 == Nil // Ok

}
}
2 changes: 2 additions & 0 deletions tests/pos/sudoku.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import scala.io.StdIn.readLine

object SudokuSolver extends App {
// The board is represented by an array of strings (arrays of chars),
// held in a global variable m. The program begins by reading 9 lines
Expand Down
5 changes: 3 additions & 2 deletions tests/run/array-charSeq.scala
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import runtime.ArrayCharSequence

object Test {
val arr = Array[Char]('a' to 'i': _*)
var xs: CharSequence = arr
var xs: CharSequence = new runtime.ArrayCharSequence(arr, 0, arr.length)
val hash = xs.hashCode

def check(chars: CharSequence): Unit = {
println("\n[check '" + chars + "'] len = " + chars.length)
chars match {
case x: Predef.ArrayCharSequence => assert(x.__arrayOfChars eq arr, ((x.__arrayOfChars, arr)))
case x: runtime.ArrayCharSequence => assert(x.xs eq arr, ((x.xs, arr)))
case x => assert(false, x)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/run/equality.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// a quickly assembled test of equality. Needs work.
object Test
{
import scala.runtime.ScalaRunTime.hash
def hash(x: Any): Int = x.## // forces upcast to Any

def makeFromInt(x: Int) = List(
x.toByte, x.toShort, x.toInt, x.toLong, x.toFloat, x.toDouble, BigInt(x), BigDecimal(x)
Expand Down
48 changes: 0 additions & 48 deletions tests/run/hashset.scala

This file was deleted.

48 changes: 0 additions & 48 deletions tests/run/parmap-ops.scala

This file was deleted.

94 changes: 0 additions & 94 deletions tests/run/pc-conversions.scala

This file was deleted.

23 changes: 0 additions & 23 deletions tests/run/t3647.scala

This file was deleted.

8 changes: 0 additions & 8 deletions tests/run/t4608.scala

This file was deleted.

9 changes: 0 additions & 9 deletions tests/run/t4723.scala

This file was deleted.

11 changes: 0 additions & 11 deletions tests/run/t4761.scala

This file was deleted.

27 changes: 0 additions & 27 deletions tests/run/t4894.scala

This file was deleted.

16 changes: 0 additions & 16 deletions tests/run/t4895.scala

This file was deleted.

21 changes: 0 additions & 21 deletions tests/run/t6052.scala

This file was deleted.

9 changes: 0 additions & 9 deletions tests/run/t6410.scala

This file was deleted.

20 changes: 0 additions & 20 deletions tests/run/t6467.scala

This file was deleted.

6 changes: 0 additions & 6 deletions tests/run/t6908.scala

This file was deleted.

Loading

0 comments on commit 40c9fee

Please sign in to comment.