Skip to content

Commit 373eecf

Browse files
Merge branch 'topic/als#1424' into 'edge'
Add automatic test See merge request eng/ide/ada_language_server!1699
2 parents 42c2aaa + 49c5db7 commit 373eecf

File tree

4 files changed

+142
-0
lines changed

4 files changed

+142
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
project Default is
2+
end Default;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
procedure Main is
2+
procedure Do_Something (First, Second : Integer) is
3+
begin
4+
Ada.Text_IO.Put_Line (First'Img);
5+
Ada.Text_IO.Put_Line (Second'Img);
6+
end Do_Something;
7+
begin
8+
Do_Something (2, 3);
9+
end Main;
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
[
2+
{
3+
"comment": [
4+
"Verify that textDocument/definition does not raise any error ",
5+
"when performed on a basic decl with multiple defining names (e.g: when done on 'B'",
6+
" or 'A' in the following parameters' list: '(A, B : Integer)')"
7+
]
8+
},
9+
{
10+
"start": {
11+
"cmd": ["${ALS}"]
12+
}
13+
},
14+
{
15+
"send": {
16+
"request": {
17+
"params": {
18+
"processId": 13950,
19+
"capabilities": {
20+
"workspace": {
21+
"applyEdit": false
22+
}
23+
},
24+
"rootUri": "$URI{.}"
25+
},
26+
"jsonrpc": "2.0",
27+
"id": 1,
28+
"method": "initialize"
29+
},
30+
"wait": [
31+
{
32+
"id": 1,
33+
"result": {
34+
"capabilities": {
35+
"textDocumentSync": 2,
36+
"signatureHelpProvider": {
37+
"triggerCharacters": [",", "("],
38+
"retriggerCharacters": ["\b"]
39+
}
40+
}
41+
}
42+
}
43+
]
44+
}
45+
},
46+
{
47+
"send": {
48+
"request": {
49+
"jsonrpc": "2.0",
50+
"method": "initialized"
51+
},
52+
"wait": []
53+
}
54+
},
55+
{
56+
"send": {
57+
"request": {
58+
"jsonrpc": "2.0",
59+
"method": "workspace/didChangeConfiguration",
60+
"params": {
61+
"settings": {
62+
"ada": {
63+
"defaultCharset": "ISO-8859-1",
64+
"projectFile": "$URI{default.gpr}",
65+
"scenarioVariables": {}
66+
}
67+
}
68+
}
69+
},
70+
"wait": []
71+
}
72+
},
73+
{
74+
"send": {
75+
"request": {
76+
"jsonrpc": "2.0",
77+
"method": "textDocument/didOpen",
78+
"params": {
79+
"textDocument": {
80+
"uri": "$URI{main.adb}",
81+
"languageId": "Ada",
82+
"version": 0,
83+
"text": "procedure Main is\n procedure Do_Something (First, Second : Integer) is\n begin\n Ada.Text_IO.Put_Line (First'Img);\n Ada.Text_IO.Put_Line (Second'Img);\n end Do_Something;\nbegin\n Do_Something (2, 3);\nend Main;\n"
84+
}
85+
}
86+
},
87+
"wait": []
88+
}
89+
},
90+
{
91+
"send": {
92+
"request": {
93+
"jsonrpc": "2.0",
94+
"id": 5,
95+
"method": "textDocument/definition",
96+
"params": {
97+
"textDocument": {
98+
"uri": "$URI{main.adb}"
99+
},
100+
"position": {
101+
"line": 1,
102+
"character": 27
103+
},
104+
"alsDisplayMethodAncestryOnNavigation": "Usage_And_Abstract_Only"
105+
}
106+
},
107+
"wait": [{ "jsonrpc": "2.0", "id": 5, "result": [] }]
108+
}
109+
},
110+
{
111+
"send": {
112+
"request": {
113+
"jsonrpc": "2.0",
114+
"id": 8,
115+
"method": "shutdown"
116+
},
117+
"wait": [
118+
{
119+
"id": 8,
120+
"result": null
121+
}
122+
]
123+
}
124+
},
125+
{
126+
"stop": {
127+
"exit_code": 0
128+
}
129+
}
130+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
title: 'als.1424.definition.multiple_defining'

0 commit comments

Comments
 (0)