diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/pyunit/lsp/002coverage/replies.json | 45 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/003errors/replies.json | 96 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/005create/replies.json | 37 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/006opterr/cmds.json | 4 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/006opterr/replies.json | 10 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/LanguageServer.py | 2 |
6 files changed, 132 insertions, 62 deletions
diff --git a/testsuite/pyunit/lsp/002coverage/replies.json b/testsuite/pyunit/lsp/002coverage/replies.json index ff269dd6e..b7bcf55d2 100644 --- a/testsuite/pyunit/lsp/002coverage/replies.json +++ b/testsuite/pyunit/lsp/002coverage/replies.json @@ -260,21 +260,6 @@ "source": "ghdl", "range": { "start": { - "line": 12, - "character": 2 - }, - "end": { - "line": 12, - "character": 2 - } - }, - "message": "target is not a signal name", - "severity": 1 - }, - { - "source": "ghdl", - "range": { - "start": { "line": 14, "character": 2 }, @@ -384,21 +369,6 @@ "source": "ghdl", "range": { "start": { - "line": 12, - "character": 2 - }, - "end": { - "line": 12, - "character": 2 - } - }, - "message": "target is not a signal name", - "severity": 1 - }, - { - "source": "ghdl", - "range": { - "start": { "line": 14, "character": 2 }, @@ -468,21 +438,6 @@ "source": "ghdl", "range": { "start": { - "line": 12, - "character": 2 - }, - "end": { - "line": 12, - "character": 2 - } - }, - "message": "target is not a signal name", - "severity": 1 - }, - { - "source": "ghdl", - "range": { - "start": { "line": 14, "character": 2 }, diff --git a/testsuite/pyunit/lsp/003errors/replies.json b/testsuite/pyunit/lsp/003errors/replies.json index dd52af8cd..c4ec4dd04 100644 --- a/testsuite/pyunit/lsp/003errors/replies.json +++ b/testsuite/pyunit/lsp/003errors/replies.json @@ -41,23 +41,103 @@ "character": 9 } }, - "message": "unit \"std_logic_unsigned\" not found in library \"ieee\"", + "message": "use of synopsys package \"std_logic_unsigned\" needs the -fsynopsys option", "severity": 1 }, { "source": "ghdl", "range": { "start": { - "line": 2, - "character": 9 + "line": 10, + "character": 13 }, "end": { - "line": 2, - "character": 9 + "line": 10, + "character": 13 } }, - "message": " (use --ieee=synopsys for non-standard synopsys packages)", + "message": "operator \"/=\" is overloaded", + "severity": 1, + "relatedInformation": [ + { + "location": { + "uri": "file://pyunit/lsp/003errors/tc.vhdl", + "range": { + "start": { + "line": 10, + "character": 13 + }, + "end": { + "line": 10, + "character": 13 + } + } + }, + "message": "possible interpretations are:" + }, + { + "location": { + "uri": "file:///Users/gingold/devel/ghdl/lib/ghdl/src/synopsys/std_logic_unsigned.vhdl", + "range": { + "start": { + "line": 67, + "character": 13 + }, + "end": { + "line": 67, + "character": 13 + } + } + }, + "message": "function \"/=\" [std_logic_vector, std_logic_vector return boolean]" + }, + { + "location": { + "uri": "file:///Users/gingold/devel/ghdl/lib/ghdl/src/ieee/v93/std_logic_1164.vhdl", + "range": { + "start": { + "line": 89, + "character": 7 + }, + "end": { + "line": 89, + "character": 7 + } + } + }, + "message": "function \"/=\" [std_logic_vector, std_logic_vector return boolean]" + } + ] + }, + { + "source": "ghdl", + "range": { + "start": { + "line": 10, + "character": 13 + }, + "end": { + "line": 10, + "character": 13 + } + }, + "message": "(you may want to use the -fexplicit option)", "severity": 1 + }, + { + "source": "ghdl", + "range": { + "start": { + "line": 8, + "character": 11 + }, + "end": { + "line": 8, + "character": 11 + } + }, + "message": "signal \"s\" is never referenced", + "severity": 2 } ] } @@ -70,7 +150,7 @@ "kind": 2, "name": "tb", "location": { - "uri": "file://003errors/tc.vhdl", + "uri": "file://pyunit/lsp/003errors/tc.vhdl", "range": { "start": { "line": 4, @@ -87,7 +167,7 @@ "kind": 2, "name": "behav", "location": { - "uri": "file://003errors/tc.vhdl", + "uri": "file://pyunit/lsp/003errors/tc.vhdl", "range": { "start": { "line": 7, diff --git a/testsuite/pyunit/lsp/005create/replies.json b/testsuite/pyunit/lsp/005create/replies.json index 06027b28a..327618f6e 100644 --- a/testsuite/pyunit/lsp/005create/replies.json +++ b/testsuite/pyunit/lsp/005create/replies.json @@ -26,6 +26,41 @@ { "jsonrpc": "2.0", "id": 7, - "result": [] + "result": [ + { + "kind": 2, + "name": "hello_world", + "location": { + "uri": "file://../files/hello.vhdl", + "range": { + "start": { + "line": 5, + "character": 0 + }, + "end": { + "line": 6, + "character": 0 + } + } + } + }, + { + "kind": 2, + "name": "behaviour", + "location": { + "uri": "file://../files/hello.vhdl", + "range": { + "start": { + "line": 8, + "character": 0 + }, + "end": { + "line": 17, + "character": 0 + } + } + } + } + ] } ] diff --git a/testsuite/pyunit/lsp/006opterr/cmds.json b/testsuite/pyunit/lsp/006opterr/cmds.json index 1d95b1da4..cc96c55f4 100644 --- a/testsuite/pyunit/lsp/006opterr/cmds.json +++ b/testsuite/pyunit/lsp/006opterr/cmds.json @@ -240,7 +240,7 @@ "method": "textDocument/didOpen", "params": { "textDocument": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "languageId": "vhdl", "version": 1, "text": "\nlibrary ieee;\nuse ieee.std_logic_1164.all;\n\nentity heartbeat is\n port ( clk: out std_logic);\nend heartbeat;\n\narchitecture behaviour of heartbeat\nis\n constant clk_period : time := 10 ns;\nbegin\n -- Clock process definition\n clk_process: process\n begin\n clk <= '0';\n wait for clk_period/2;\n clk <= '1';\n wait for clk_period/2;\n end process;\nend behaviour;\n\n" @@ -253,7 +253,7 @@ "method": "textDocument/documentSymbol", "params": { "textDocument": { - "uri": "file://files/heartbeat.vhdl" + "uri": "file://../files/heartbeat.vhdl" } } } diff --git a/testsuite/pyunit/lsp/006opterr/replies.json b/testsuite/pyunit/lsp/006opterr/replies.json index e32ae2017..a5a142112 100644 --- a/testsuite/pyunit/lsp/006opterr/replies.json +++ b/testsuite/pyunit/lsp/006opterr/replies.json @@ -35,7 +35,7 @@ "jsonrpc": "2.0", "method": "textDocument/publishDiagnostics", "params": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "diagnostics": [] } }, @@ -47,7 +47,7 @@ "kind": 2, "name": "heartbeat", "location": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "range": { "start": { "line": 4, @@ -64,7 +64,7 @@ "kind": 2, "name": "behaviour", "location": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "range": { "start": { "line": 8, @@ -81,7 +81,7 @@ "kind": 6, "name": "clk_process", "location": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "range": { "start": { "line": 13, @@ -97,7 +97,7 @@ "kind": 2, "name": "behaviour", "location": { - "uri": "file://files/heartbeat.vhdl", + "uri": "file://../files/heartbeat.vhdl", "range": { "start": { "line": 8, diff --git a/testsuite/pyunit/lsp/LanguageServer.py b/testsuite/pyunit/lsp/LanguageServer.py index 251b9c9a8..24f023771 100644 --- a/testsuite/pyunit/lsp/LanguageServer.py +++ b/testsuite/pyunit/lsp/LanguageServer.py @@ -101,7 +101,7 @@ class JSONTest(TestCase): if rep != r: print(self.__class__.__name__) show_diffs("[{}]".format(i), r, rep) - #errs += 1 + errs += 1 rep = ls.read_request() self.assertIsNone(rep, "Too many replies.") |