implements PLN-0133
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 62.84% (18504/29445)
* Branch Coverage: 53.33% (7215/13528)
* Lines of Code: 29445
* Cyclomatic Complexity: 11850
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 669
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 62.84% (18504/29445)
* Branch Coverage: 53.33% (7215/13528)
* Lines of Code: 29445
* Cyclomatic Complexity: 11850
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 15, passed: 669
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Add PBS document symbols as an AST-backed hierarchical outline of the open .pbs file on FrontendLanguageService. Recovered syntax is enough; unnamed InvalidDecl is omitted; barrels, imports, locals, and compile-only frontends stay empty. Advertise documentSymbolProvider with hierarchical DocumentSymbol. Housekeep DSC-0041 with LSN-0070.
This commit is contained in:
+64
@@ -24,6 +24,70 @@ class FrontendLanguageServiceTest {
|
||||
assertEquals(FrontendSignatureHelp.empty(), service.signatureHelp(request, 0));
|
||||
assertTrue(service.definition(request, 0).isEmpty());
|
||||
assertTrue(service.references(request, 0).isEmpty());
|
||||
assertTrue(service.documentSymbols(request).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
void documentSymbolRejectsBlankNameAndInvertedRangesAndCopiesChildren() {
|
||||
final var child = new FrontendDocumentSymbol(
|
||||
"x",
|
||||
FrontendSymbolKind.FIELD,
|
||||
"int",
|
||||
10,
|
||||
16,
|
||||
10,
|
||||
16,
|
||||
List.of());
|
||||
final var symbol = new FrontendDocumentSymbol(
|
||||
" Point ",
|
||||
FrontendSymbolKind.STRUCT,
|
||||
" ",
|
||||
0,
|
||||
20,
|
||||
8,
|
||||
13,
|
||||
List.of(child));
|
||||
assertEquals("Point", symbol.name());
|
||||
assertEquals("", symbol.detail());
|
||||
assertEquals(1, symbol.children().size());
|
||||
assertEquals("x", symbol.children().getFirst().name());
|
||||
assertThrows(UnsupportedOperationException.class, () -> symbol.children().add(child));
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendDocumentSymbol(
|
||||
" ",
|
||||
FrontendSymbolKind.FUNCTION,
|
||||
"",
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
List.of()));
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendDocumentSymbol(
|
||||
"fn",
|
||||
FrontendSymbolKind.FUNCTION,
|
||||
"",
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
List.of()));
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendDocumentSymbol(
|
||||
"fn",
|
||||
FrontendSymbolKind.FUNCTION,
|
||||
"",
|
||||
5,
|
||||
4,
|
||||
0,
|
||||
1,
|
||||
List.of()));
|
||||
assertThrows(IllegalArgumentException.class, () -> new FrontendDocumentSymbol(
|
||||
"fn",
|
||||
FrontendSymbolKind.FUNCTION,
|
||||
"",
|
||||
0,
|
||||
1,
|
||||
3,
|
||||
2,
|
||||
List.of()));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user