Skip to content

Commit fdedd8a

Browse files
committed
Add first multi-workspace IDE test
1 parent d51e463 commit fdedd8a

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
@@ -37,6 +37,20 @@ class DefinitionTest {
3737
.definition(m13 to m14, List(m3 to m4))
3838
}
3939

40+
@Test def classDefinitionDifferentWorkspace: Unit = {
41+
val w0 = Workspace.withSources(
42+
code"""class ${m1}Foo${m2}"""
43+
)
44+
45+
val w1 = Workspace.dependingOn(w0).withSources(
46+
code"""class Bar { new ${m3}Foo${m4} }"""
47+
)
48+
49+
withWorkspaces(w0, w1)
50+
.definition(m1 to m2, List(m1 to m2))
51+
.definition(m3 to m4, List(m1 to m2))
52+
}
53+
4054
@Test def valDefinition0: Unit = {
4155
withSources(
4256
code"class Foo { val ${m1}x$m2 = 0; ${m3}x$m4 }",

0 commit comments

Comments
 (0)