8000 bugfix: Fix tests to work on JDK 8 and later · scala/scala@76c3724 · GitHub
[go: up one dir, main page]

Skip to content

Commit 76c3724

Browse files
committed
bugfix: Fix tests to work on JDK 8 and later
1 parent a3676f0 commit 76c3724

File tree

5 files changed

+17
-15
lines changed

5 files changed

+17
-15
lines changed

src/interactive/scala/tools/nsc/interactive/tests/InteractiveTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ abstract class InteractiveTest
8686
loadSources()
8787
runDefaultTests()
8888
}
89-
}.linesIterator.map(normalize).foreach(println)
89+
}.linesIterator.filterNot(filterOutLines).map(normalize).foreach(println)
9090
}
9191

92+
protected def filterOutLines(line: String) = false
9293
protected def normalize(s: String) = s
9394

9495
/** Load all sources before executing the test. */

test/files/presentation/package-object-issues.check

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
reload: Main.scala
22

3-
askTypeCompletion at Main.scala(7,6)
3+
askTypeCompletion at Main.scala(11,6)
44
================================================================================
5-
[response] askTypeCompletion at (7,6)
6-
retrieved 46 members
7-
[inaccessible] private[package lang] def getStackTraceDepth(): Int
8-
[inaccessible] private[package lang] def getStackTraceElement(x$1: Int): StackTraceElement
9-
[inaccessible] protected[package lang] def clone(): Object
10-
[inaccessible] protected[package lang] def finalize(): Unit
5+
[response] askTypeCompletion at (11,6)
116
def +(other: String): String
127
def ->[B](y: B): (concurrent.ExecutionException, B)
138
def ensuring(cond: Boolean): concurrent.ExecutionException
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
import scala.tools.nsc.interactive.tests.InteractiveTest
22

3-
object Test extends InteractiveTest
3+
object Test extends InteractiveTest {
4+
5+
override protected def filterOutLines(line: String) =
6+
line.contains("inaccessible") || line.contains("retrieved ")
7+
8+
}

test/files/presentation/package-object-type.check

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ reload: Main.scala
33
askTypeCompletion at Main.scala(7,6)
44
================================================================================
55
[response] askTypeCompletion at (7,6)
6-
retrieved 46 members
7-
[inaccessible] private[package lang] def getStackTraceDepth(): Int
8-
[inaccessible] private[package lang] def getStackTraceElement(x$1: Int): StackTraceElement
9-
[inaccessible] protected[package lang] def clone(): Object
10-
[inaccessible] protected[package lang] def finalize(): Unit
116
def +(other: String): String
127
def ->[B](y: B): (concurrent.ExecutionException, B)
138
def ensuring(cond: Boolean): concurrent.ExecutionException
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
import scala.tools.nsc.interactive.tests.InteractiveTest
2+
import scala.tools.nsc.util
23

3-
object Test extends InteractiveTest
4+
object Test extends InteractiveTest {
5+
6+
override protected def filterOutLines(line: String) =
7+
line.contains("inaccessible") || line.contains("retrieved ")
8+
9+
}

0 commit comments

Comments
 (0)
0