Skip to content

Commit 4762d30

Browse files
committed
Adapt REPL tests for the 2.13 stdlib
1 parent a15b2b1 commit 4762d30

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

compiler/test/dotty/tools/repl/ReplCompilerTests.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ReplCompilerTests extends ReplTest {
6565
assertEquals(1, state.imports.size)
6666
run("""mutable.Map("one" -> 1)""")
6767
assertEquals(
68-
"val res0: scala.collection.mutable.Map[String, Int] = Map(one -> 1)",
68+
"val res0: scala.collection.mutable.Map[String, Int] = HashMap(one -> 1)",
6969
storedOutput().trim
7070
)
7171
}
@@ -115,9 +115,10 @@ class ReplCompilerTests extends ReplTest {
115115
}
116116

117117
@Test def i4051 = fromInitialState { implicit state =>
118+
// FIXME: shouldn't have to pass a type parameter to collect.
118119
val source =
119120
"""val x: PartialFunction[Int, Int] = { case x => x }
120-
|val y = Map(("A", 1), ("B", 2), ("X", 3)).collect { case (k, v) => v }.toList""".stripMargin
121+
|val y = Map(("A", 1), ("B", 2), ("X", 3)).collect[Int] { case (k, v) => v }.toList""".stripMargin
121122

122123
val expected = List(
123124
"val x: PartialFunction[Int, Int] = <function1>",

compiler/test/dotty/tools/repl/TabcompleteTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class TabcompleteTests extends ReplTest {
100100
@Test def importScala = fromInitialState { implicit s =>
101101
val comp = tabComplete("import scala.")
102102
// check that there are no special symbols leaked: <byname>, <special-ops>, ...
103-
assertEquals(comp.find(_.startsWith("<")), None)
103+
assertEquals(comp.find(_.startsWith("<")), Some("<:<"))
104104
assert(!comp.contains("package"))
105105
}
106106

0 commit comments

Comments
 (0)