diff options
Diffstat (limited to 'testsuite/pyunit/lsp/003errors')
-rw-r--r-- | testsuite/pyunit/lsp/003errors/cmds.json | 245 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/003errors/crash1.json | 229 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/003errors/crash2.json | 239 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/003errors/replies.json | 110 | ||||
-rw-r--r-- | testsuite/pyunit/lsp/003errors/tc.vhdl | 12 |
5 files changed, 835 insertions, 0 deletions
diff --git a/testsuite/pyunit/lsp/003errors/cmds.json b/testsuite/pyunit/lsp/003errors/cmds.json new file mode 100644 index 000000000..03d6b1e37 --- /dev/null +++ b/testsuite/pyunit/lsp/003errors/cmds.json @@ -0,0 +1,245 @@ +[ + { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 5529, + "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors", + "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true + }, + "didChangeConfiguration": { + "dynamicRegistration": true + }, + "didChangeWatchedFiles": { + "dynamicRegistration": true + }, + "symbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "executeCommand": { + "dynamicRegistration": true + }, + "configuration": true, + "workspaceFolders": true + }, + "textDocument": { + "publishDiagnostics": { + "relatedInformation": true + }, + "synchronization": { + "dynamicRegistration": true, + "willSave": true, + "willSaveWaitUntil": true, + "didSave": true + }, + "completion": { + "dynamicRegistration": true, + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": [ + "markdown", + "plaintext" + ], + "deprecatedSupport": true + }, + "completionItemKind": { + "valueSet": [ + 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 + ] + } + }, + "hover": { + "dynamicRegistration": true, + "contentFormat": [ + "markdown", + "plaintext" + ] + }, + "signatureHelp": { + "dynamicRegistration": true, + "signatureInformation": { + "documentationFormat": [ + "markdown", + "plaintext" + ] + } + }, + "definition": { + "dynamicRegistration": true + }, + "references": { + "dynamicRegistration": true + }, + "documentHighlight": { + "dynamicRegistration": true + }, + "documentSymbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "codeAction": { + "dynamicRegistration": true + }, + "codeLens": { + "dynamicRegistration": true + }, + "formatting": { + "dynamicRegistration": true + }, + "rangeFormatting": { + "dynamicRegistration": true + }, + "onTypeFormatting": { + "dynamicRegistration": true + }, + "rename": { + "dynamicRegistration": true + }, + "documentLink": { + "dynamicRegistration": true + }, + "typeDefinition": { + "dynamicRegistration": true + }, + "implementation": { + "dynamicRegistration": true + }, + "colorProvider": { + "dynamicRegistration": true + } + } + }, + "trace": "off", + "workspaceFolders": [ + { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "name": "003errors" + } + ] + } + }, + { + "jsonrpc": "2.0", + "method": "initialized", + "params": {} + }, + { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "languageId": "vhdl", + "version": 1, + "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity tb is\nend tb;\n\narchitecture behav of tb is\n signal s : std_logic_vector(7 downto 0);\nbegin\n assert s /= x\"73\";\nend behav; \n" + } + } + }, + { + "jsonrpc": "2.0", + "id": 1, + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl" + } + } + }, + { + "jsonrpc": "2.0", + "id": 2, + "method": "shutdown", + "params": null + } +] diff --git a/testsuite/pyunit/lsp/003errors/crash1.json b/testsuite/pyunit/lsp/003errors/crash1.json new file mode 100644 index 000000000..155770d78 --- /dev/null +++ b/testsuite/pyunit/lsp/003errors/crash1.json @@ -0,0 +1,229 @@ +[ + { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 27805, + "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors", + "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true + }, + "didChangeConfiguration": { + "dynamicRegistration": true + }, + "didChangeWatchedFiles": { + "dynamicRegistration": true + }, + "symbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "executeCommand": { + "dynamicRegistration": true + }, + "configuration": true, + "workspaceFolders": true + }, + "textDocument": { + "publishDiagnostics": { + "relatedInformation": true + }, + "synchronization": { + "dynamicRegistration": true, + "willSave": true, + "willSaveWaitUntil": true, + "didSave": true + }, + "completion": { + "dynamicRegistration": true, + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": [ + "markdown", + "plaintext" + ], + "deprecatedSupport": true + }, + "completionItemKind": { + "valueSet": [ + 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 + ] + } + }, + "hover": { + "dynamicRegistration": true, + "contentFormat": [ + "markdown", + "plaintext" + ] + }, + "signatureHelp": { + "dynamicRegistration": true, + "signatureInformation": { + "documentationFormat": [ + "markdown", + "plaintext" + ] + } + }, + "definition": { + "dynamicRegistration": true + }, + "references": { + "dynamicRegistration": true + }, + "documentHighlight": { + "dynamicRegistration": true + }, + "documentSymbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "codeAction": { + "dynamicRegistration": true + }, + "codeLens": { + "dynamicRegistration": true + }, + "formatting": { + "dynamicRegistration": true + }, + "rangeFormatting": { + "dynamicRegistration": true + }, + "onTypeFormatting": { + "dynamicRegistration": true + }, + "rename": { + "dynamicRegistration": true + }, + "documentLink": { + "dynamicRegistration": true + }, + "typeDefinition": { + "dynamicRegistration": true + }, + "implementation": { + "dynamicRegistration": true + }, + "colorProvider": { + "dynamicRegistration": true + } + } + }, + "trace": "off", + "workspaceFolders": [ + { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "name": "003errors" + } + ] + } + }, + { + "jsonrpc": "2.0", + "method": "initialized", + "params": {} + }, + { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "languageId": "vhdl", + "version": 74, + "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity \n" + } + } + } +] diff --git a/testsuite/pyunit/lsp/003errors/crash2.json b/testsuite/pyunit/lsp/003errors/crash2.json new file mode 100644 index 000000000..ab12ed3bf --- /dev/null +++ b/testsuite/pyunit/lsp/003errors/crash2.json @@ -0,0 +1,239 @@ +[ + { + "jsonrpc": "2.0", + "id": 0, + "method": "initialize", + "params": { + "processId": 30387, + "rootPath": "/home/tgingold/work/vhdl-language-server/tests/003errors", + "rootUri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "capabilities": { + "workspace": { + "applyEdit": true, + "workspaceEdit": { + "documentChanges": true + }, + "didChangeConfiguration": { + "dynamicRegistration": true + }, + "didChangeWatchedFiles": { + "dynamicRegistration": true + }, + "symbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "executeCommand": { + "dynamicRegistration": true + }, + "configuration": true, + "workspaceFolders": true + }, + "textDocument": { + "publishDiagnostics": { + "relatedInformation": true + }, + "synchronization": { + "dynamicRegistration": true, + "willSave": true, + "willSaveWaitUntil": true, + "didSave": true + }, + "completion": { + "dynamicRegistration": true, + "contextSupport": true, + "completionItem": { + "snippetSupport": true, + "commitCharactersSupport": true, + "documentationFormat": [ + "markdown", + "plaintext" + ], + "deprecatedSupport": true + }, + "completionItemKind": { + "valueSet": [ + 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 + ] + } + }, + "hover": { + "dynamicRegistration": true, + "contentFormat": [ + "markdown", + "plaintext" + ] + }, + "signatureHelp": { + "dynamicRegistration": true, + "signatureInformation": { + "documentationFormat": [ + "markdown", + "plaintext" + ] + } + }, + "definition": { + "dynamicRegistration": true + }, + "references": { + "dynamicRegistration": true + }, + "documentHighlight": { + "dynamicRegistration": true + }, + "documentSymbol": { + "dynamicRegistration": true, + "symbolKind": { + "valueSet": [ + 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 + ] + } + }, + "codeAction": { + "dynamicRegistration": true + }, + "codeLens": { + "dynamicRegistration": true + }, + "formatting": { + "dynamicRegistration": true + }, + "rangeFormatting": { + "dynamicRegistration": true + }, + "onTypeFormatting": { + "dynamicRegistration": true + }, + "rename": { + "dynamicRegistration": true + }, + "documentLink": { + "dynamicRegistration": true + }, + "typeDefinition": { + "dynamicRegistration": true + }, + "implementation": { + "dynamicRegistration": true + }, + "colorProvider": { + "dynamicRegistration": true + } + } + }, + "trace": "off", + "workspaceFolders": [ + { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors", + "name": "003errors" + } + ] + } + }, + { + "jsonrpc": "2.0", + "method": "initialized", + "params": {} + }, + { + "jsonrpc": "2.0", + "method": "textDocument/didOpen", + "params": { + "textDocument": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "languageId": "vhdl", + "version": 172, + "text": "library ieee;\nuse ieee.std_logic_1164.all;\nuse ieee.std_logic_unsigned.all;\n\nentity tb is\nend tb;\n\narchitecture behav of tb is\n signal s : std_logic_vector(7 downto 0);\nbegin\n assert s != x\"73\";\n end process;\nend behav; \n" + } + } + }, + { + "jsonrpc": "2.0", + "id": 1, + "method": "textDocument/documentSymbol", + "params": { + "textDocument": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl" + } + } + } +] diff --git a/testsuite/pyunit/lsp/003errors/replies.json b/testsuite/pyunit/lsp/003errors/replies.json new file mode 100644 index 000000000..02e9cac85 --- /dev/null +++ b/testsuite/pyunit/lsp/003errors/replies.json @@ -0,0 +1,110 @@ +[ + { + "jsonrpc": "2.0", + "id": 0, + "result": { + "capabilities": { + "textDocumentSync": { + "openClose": true, + "change": 2, + "save": { + "includeText": true + } + }, + "hoverProvider": false, + "definitionProvider": true, + "referencesProvider": false, + "documentHighlightProvider": false, + "documentSymbolProvider": true, + "codeActionProvider": false, + "documentFormattingProvider": false, + "documentRangeFormattingProvider": true, + "renameProvider": false + } + } + }, + { + "jsonrpc": "2.0", + "method": "textDocument/publishDiagnostics", + "params": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "diagnostics": [ + { + "source": "ghdl", + "range": { + "start": { + "line": 2, + "character": 9 + }, + "end": { + "line": 2, + "character": 9 + } + }, + "message": "unit \"std_logic_unsigned\" not found in library \"ieee\"", + "severity": 1 + }, + { + "source": "ghdl", + "range": { + "start": { + "line": 2, + "character": 9 + }, + "end": { + "line": 2, + "character": 9 + } + }, + "message": " (use --ieee=synopsys for non-standard synopsys packages)", + "severity": 1 + } + ] + } + }, + { + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "kind": 2, + "name": "tb", + "location": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "range": { + "start": { + "line": 4, + "character": 0 + }, + "end": { + "line": 5, + "character": 0 + } + } + } + }, + { + "kind": 2, + "name": "behav", + "location": { + "uri": "file:///home/tgingold/work/vhdl-language-server/tests/003errors/tc.vhdl", + "range": { + "start": { + "line": 7, + "character": 0 + }, + "end": { + "line": 11, + "character": 0 + } + } + } + } + ] + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": null + } +] diff --git a/testsuite/pyunit/lsp/003errors/tc.vhdl b/testsuite/pyunit/lsp/003errors/tc.vhdl new file mode 100644 index 000000000..6308aeb6f --- /dev/null +++ b/testsuite/pyunit/lsp/003errors/tc.vhdl @@ -0,0 +1,12 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.std_logic_unsigned.all; + +entity tb is +end tb; + +architecture behav of tb is + signal s : std_logic_vector(7 downto 0); +begin + assert s /= x"73"; +end behav; |