forked from jacobdufault/cquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outline.py
39 lines (38 loc) · 1.15 KB
/
outline.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import e2e_test_runner
from e2e_tests.utils import *
def Test_Outline():
return (e2e_test_runner.TestBuilder()
.SetupCommonInit()
.IndexFile("foo.cc",
"""void foobar();""")
.WaitForIdle()
.Send({
'id': 1,
'method': 'textDocument/documentSymbol',
'params': {
'textDocument': {
'uri': BuildUri('foo.cc')
}
}
})
.Expect({
'id': 1,
'result': [{
'containerName': 'void foobar()',
'kind': 12,
'name': 'foobar',
'location': {
'range': {
'start': {
'line': 0,
'character': 5
},
'end': {
'line': 0,
'character': 11
}
},
'uri': BuildUri('foo.cc')
}
}]
}))