Skip to content

Commit 0e85f0b

Browse files
committed
Add first multi-workspace IDE test
1 parent 55f0c5e commit 0e85f0b

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
@@ -18,6 +18,20 @@ class DefinitionTest {
1818
.definition(m5 to m6, List(m1 to m2))
1919
}
2020

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

0 commit comments

Comments
 (0)