Skip to content

Commit 3b93e3a

Browse files
committed
general: fix testcase
Signed-off-by: Koichi Shiraishi <[email protected]>
1 parent a835ee4 commit 3b93e3a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

general_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ func testReferencesParams(t *testing.T, marshal marshalFunc, unmarshal unmarshal
838838
wantNilAll = `{"textDocument":{"uri":"file:///path/to/basic.go"},"position":{"line":25,"character":1},"context":{"includeDeclaration":true}}`
839839
wantInvalid = `{"textDocument":{"uri":"file:///path/to/basic_gen.go"},"position":{"line":2,"character":1},"workDoneToken":"` + wantPartialResultToken + `","partialResultToken":"` + wantWorkDoneToken + `","context":{"includeDeclaration":false}}`
840840
)
841-
wantType := ReferencesParams{
841+
wantType := ReferenceParams{
842842
TextDocumentPositionParams: TextDocumentPositionParams{
843843
TextDocument: TextDocumentIdentifier{
844844
URI: uri.File("/path/to/basic.go"),
@@ -858,7 +858,7 @@ func testReferencesParams(t *testing.T, marshal marshalFunc, unmarshal unmarshal
858858
IncludeDeclaration: true,
859859
},
860860
}
861-
wantTypeNilAll := ReferencesParams{
861+
wantTypeNilAll := ReferenceParams{
862862
TextDocumentPositionParams: TextDocumentPositionParams{
863863
TextDocument: TextDocumentIdentifier{
864864
URI: uri.File("/path/to/basic.go"),
@@ -878,7 +878,7 @@ func testReferencesParams(t *testing.T, marshal marshalFunc, unmarshal unmarshal
878878

879879
tests := []struct {
880880
name string
881-
field ReferencesParams
881+
field ReferenceParams
882882
want string
883883
wantMarshalErr bool
884884
wantErr bool
@@ -929,7 +929,7 @@ func testReferencesParams(t *testing.T, marshal marshalFunc, unmarshal unmarshal
929929
tests := []struct {
930930
name string
931931
field string
932-
want ReferencesParams
932+
want ReferenceParams
933933
wantUnmarshalErr bool
934934
wantErr bool
935935
}{
@@ -961,7 +961,7 @@ func testReferencesParams(t *testing.T, marshal marshalFunc, unmarshal unmarshal
961961
t.Run(tt.name, func(t *testing.T) {
962962
t.Parallel()
963963

964-
var got ReferencesParams
964+
var got ReferenceParams
965965
if err := unmarshal([]byte(tt.field), &got); (err != nil) != tt.wantUnmarshalErr {
966966
t.Fatal(err)
967967
}
@@ -3697,7 +3697,7 @@ func testFoldingRangeRegistrationOptions(t *testing.T, marshal marshalFunc, unma
36973697

36983698
func testInitializeResult(t *testing.T, marshal marshalFunc, unmarshal unmarshalFunc) {
36993699
const (
3700-
want = `{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["Tab"]},"signatureHelpProvider":{"triggerCharacters":["C-K"],"retriggerCharacters":["."]},"declarationProvider":true,"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{"resolveProvider":true},"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":".","moreTriggerCharacter":["f"]},"renameProvider":true,"documentLinkProvider":{"resolveProvider":true},"colorProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":true,"executeCommandProvider":{"commands":["test","command"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"testNotifications"},"fileOperations":{"didCreate":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willCreate":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]},"didRename":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willRename":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]},"didDelete":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willDelete":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]}}},"linkedEditingRangeProvider":true,"callHierarchyProvider":true,"monikerProvider":true,"experimental":"Awesome Experimentals"},"serverInfo":{"name":"testServer","version":"v0.0.0"}}`
3700+
want = `{"capabilities":{"textDocumentSync":1,"completionProvider":{"resolveProvider":true,"triggerCharacters":["Tab"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["C-K"],"retriggerCharacters":["."]},"declarationProvider":true,"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"codeLensProvider":{"resolveProvider":true},"documentLinkProvider":{"resolveProvider":true},"colorProvider":true,"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":".","moreTriggerCharacter":["f"]},"renameProvider":true,"foldingRangeProvider":true,"selectionRangeProvider":true,"executeCommandProvider":{"commands":["test","command"]},"callHierarchyProvider":true,"linkedEditingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"testNotifications"},"fileOperations":{"didCreate":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willCreate":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]},"didRename":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willRename":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]},"didDelete":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"file","options":{"ignoreCase":true}}}]},"willDelete":{"filters":[{"scheme":"file","pattern":{"glob":"*","matches":"folder","options":{"ignoreCase":true}}}]}}},"monikerProvider":true,"experimental":"Awesome Experimentals"},"serverInfo":{"name":"testServer","version":"v0.0.0"}}`
37013701
wantNil = `{"capabilities":{}}`
37023702
)
37033703
wantType := InitializeResult{

0 commit comments

Comments
 (0)