Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / internal / lsp / cmd / test / highlight.go
1 package cmdtest
2
3 import (
4         "testing"
5
6         "fmt"
7
8         "golang.org/x/tools/internal/span"
9 )
10
11 func (r *runner) Highlight(t *testing.T, spn span.Span, spans []span.Span) {
12         var expect string
13         for _, l := range spans {
14                 expect += fmt.Sprintln(l)
15         }
16         expect = r.Normalize(expect)
17
18         uri := spn.URI()
19         filename := uri.Filename()
20         target := filename + ":" + fmt.Sprint(spn.Start().Line()) + ":" + fmt.Sprint(spn.Start().Column())
21         got, _ := r.NormalizeGoplsCmd(t, "highlight", target)
22         if expect != got {
23                 t.Errorf("highlight failed for %s expected:\n%s\ngot:\n%s", target, expect, got)
24         }
25 }