Skip to content

Commit f79ae94

Browse files
committed
Add first multi-workspace IDE test
1 parent 38d6973 commit f79ae94

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

language-server/test/dotty/tools/languageserver/DefinitionTest.scala

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ class DefinitionTest {
1919
.definition(m5 to m6, List(m1 to m2))
2020
}
2121

22+
@Test def classDefinitionDifferentWorkspace: Unit = {
23+
val w0 = Workspace.withSources(
24+
code"""class ${m1}Foo${m2}"""
25+
)
26+
27+
val w1 = Workspace.dependingOn(w0).withSources(
28+
code"""class Bar { new ${m3}Foo${m4} }"""
29+
)
30+
31+
withWorkspaces(w0, w1)
32+
.definition(m1 to m2, List(m1 to m2))
33+
.definition(m3 to m4, List(m1 to m2))
34+
}
35+
2236
@Test def valDefinition0: Unit = {
2337
withSources(
2438
code"class Foo { val ${m1}x$m2 = 0; ${m3}x$m4 }",

0 commit comments

Comments
 (0)