-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scalameta/metals#6620 - only test added, it already worked in `scala3` pc scalameta/metals#6625 scalameta/metals#6393
- Loading branch information
Showing
8 changed files
with
181 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
presentation-compiler/test/dotty/tools/pc/tests/completion/CompletionContextSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dotty.tools.pc.tests.completion | ||
|
||
import dotty.tools.pc.base.BaseCompletionSuite | ||
import scala.meta.pc.CompletionItemPriority | ||
import org.junit.Test | ||
|
||
class CompletionContextSuite extends BaseCompletionSuite: | ||
override val completionItemPriority: CompletionItemPriority = { | ||
case "scala/concurrent/Future." => -1 | ||
case _ => 0 | ||
} | ||
// scala.concurrent.Future should be ranked higher than java.util.concurrent.Future | ||
val futureCompletionResult: List[String] = | ||
List("Future - scala.concurrent", "Future - java.util.concurrent") | ||
|
||
@Test | ||
def `context` = | ||
check( | ||
"""package fut | ||
|object A { | ||
| Futur@@ | ||
|}""".stripMargin, | ||
"""Future - scala.concurrent | ||
|Future - java.util.concurrent | ||
|""".stripMargin, | ||
filter = futureCompletionResult.contains | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters