Skip to content

Commit

Permalink
add more test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Nov 6, 2024
1 parent 814ef1e commit 0db911c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tools/chpl-language-server/test/document_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MyClass { }
(rng((8, 9), (8, 16)), "type t = int", SymbolKind.TypeParameter),
(rng((9, 10), (9, 16)), "param p = 17", SymbolKind.Constant),
(rng((10, 10), (10, 19)), "const c: t = 18", SymbolKind.Field),
(rng((11, 8), (11, 13)), "var x: t", SymbolKind.Field),
(rng((11, 8), (11, 12)), "var x: t", SymbolKind.Field),
(rng((12, 4), (12, 19)), "proc init()", SymbolKind.Constructor),
(rng((13, 4), (13, 18)), "proc foo()", SymbolKind.Method),
(
Expand Down Expand Up @@ -170,6 +170,21 @@ async def test_document_symbols_exprs(client: LanguageClient):
"const g = -f.size;",
"const h = new R();",
"const i = new owned C();",
"const j: shared C? = new shared C?();",
"const k = (new shared C()): borrowed C?;",
"const l = (new shared C()): owned C;",
"const m: sync;",
"const n: sync int;",
"const o: owned;",
"const p: owned C;",
"const q: owned C?;",
"const r = 1: sync int;",
"const s: atomic real(64) = 1.0;",
"const t: R(?);",
"const u: R(1, ?);",
"const v = new (func())();",
"const w = new unmanaged (func(int, int))(1);",
"const x = (new shared (func())()): borrowed C?;",
]
file = "\n".join(exprs)

Expand Down

0 comments on commit 0db911c

Please sign in to comment.