summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-11-29 11:19:41 +0100
committerGitHub <noreply@github.com>2016-11-29 11:19:41 +0100
commitb02e3914b6dee6b7da1c3da1864343ccdce5ca3c (patch)
treefad9cb4f05be35ac5bd214bcc4b8418eb27c6b09 /test
parent2bc92e0b2fa9f6de2b2a6c8f9ef4b85492e7df4d (diff)
parent4fba067fc845551041b8f32b82268ecdd5d6f757 (diff)
downloadscala-b02e3914b6dee6b7da1c3da1864343ccdce5ca3c.tar.gz
scala-b02e3914b6dee6b7da1c3da1864343ccdce5ca3c.tar.bz2
scala-b02e3914b6dee6b7da1c3da1864343ccdce5ca3c.zip
Merge pull request #5561 from retronym/topic/merge-2.11.x-to-2.12.x-20161129
Merge 2.11.x to 2.12.x [ci: last-only]
Diffstat (limited to 'test')
-rw-r--r--test/junit/scala/tools/nsc/interpreter/CompletionTest.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
index 1233e8b1cc..a216b319a8 100644
--- a/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
+++ b/test/junit/scala/tools/nsc/interpreter/CompletionTest.scala
@@ -185,6 +185,14 @@ class CompletionTest {
checkExact(completer, "p1.p2.p3.Ping.Po")("Pong")
}
+ @Test
+ def performanceOfLenientMatch(): Unit = {
+ val intp = newIMain()
+ val completer = new PresentationCompilerCompleter(intp)
+ val ident: String = "thisIsAReallyLongMethodNameWithManyManyManyManyChunks"
+ checkExact(completer, s"($ident: Int) => tia")(ident)
+ }
+
def checkExact(completer: PresentationCompilerCompleter, before: String, after: String = "")(expected: String*): Unit = {
assertEquals(expected.toSet, completer.complete(before, after).candidates.toSet)
}