Fixed session tests.

This commit is contained in:
Alexandros Naskos 2020-11-04 13:00:55 +02:00
parent 5e327b41ba
commit 307ac34d4a
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2
2 changed files with 3 additions and 2 deletions

View File

@ -609,6 +609,7 @@ pub fn deinit(self: *DocumentStore) void {
self.allocator.free(pkg.name);
self.allocator.free(pkg.uri);
}
build_file.packages.deinit(self.allocator);
self.allocator.free(build_file.uri);
self.allocator.destroy(build_file);
}

View File

@ -97,7 +97,7 @@ test "Open file, ask for semantic tokens" {
try sendRequest(sem_toks_req, process);
try sendRequest(shutdown_message, process);
try consumeOutputAndWait(process, .{
\\{"jsonrpc":"2.0","id":2,"result":{"data":[0,0,5,11,0,0,6,3,0,1,0,4,1,15,0,0,2,7,16,0,0,8,5,13,0]}}
\\{"jsonrpc":"2.0","id":2,"result":{"data":[0,0,5,12,0,0,6,3,0,1,0,4,1,16,0,0,2,7,17,0,0,8,5,14,0]}}
});
}
@ -143,6 +143,6 @@ test "Requesting utf-8 offset encoding" {
try sendRequest(shutdown_message, process);
try consumeOutputAndWait(process, .{
\\{"jsonrpc":"2.0","id":0,"result": {"offsetEncoding":"utf-8","capabilities": {"signatureHelpProvider": {"triggerCharacters": ["(",","]},"textDocumentSync": 1,"renameProvider":true,"completionProvider": {"resolveProvider": false,"triggerCharacters": [".",":","@"]},"documentHighlightProvider": false,"hoverProvider": true,"codeActionProvider": false,"declarationProvider": true,"definitionProvider": true,"typeDefinitionProvider": true,"implementationProvider": false,"referencesProvider": true,"documentSymbolProvider": true,"colorProvider": false,"documentFormattingProvider": true,"documentRangeFormattingProvider": false,"foldingRangeProvider": false,"selectionRangeProvider": false,"workspaceSymbolProvider": false,"rangeProvider": false,"documentProvider": true,"workspace": {"workspaceFolders": {"supported": true,"changeNotifications": true}},"semanticTokensProvider": {"documentProvider": true,"legend": {"tokenTypes": ["namespace","type","struct","enum","union","parameter","variable","tagField","field","errorTag","function","keyword","comment","string","number","operator","builtin","label"],"tokenModifiers": ["definition","async","documentation", "generic"]}}}}}
\\{"jsonrpc":"2.0","id":0,"result": {"offsetEncoding":"utf-8","capabilities": {"signatureHelpProvider": {"triggerCharacters": ["(",","]},"textDocumentSync": 1,"renameProvider":true,"completionProvider": {"resolveProvider": false,"triggerCharacters": [".",":","@"]},"documentHighlightProvider": false,"hoverProvider": true,"codeActionProvider": false,"declarationProvider": true,"definitionProvider": true,"typeDefinitionProvider": true,"implementationProvider": false,"referencesProvider": true,"documentSymbolProvider": true,"colorProvider": false,"documentFormattingProvider": true,"documentRangeFormattingProvider": false,"foldingRangeProvider": false,"selectionRangeProvider": false,"workspaceSymbolProvider": false,"rangeProvider": false,"documentProvider": true,"workspace": {"workspaceFolders": {"supported": true,"changeNotifications": true}},"semanticTokensProvider": {"documentProvider": true,"legend": {"tokenTypes": ["namespace","type","struct","enum","union","opaque","parameter","variable","tagField","field","errorTag","function","keyword","comment","string","number","operator","builtin","label","keywordLiteral"],"tokenModifiers": ["definition","async","documentation", "generic"]}}}}}
});
}