1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 "golang.org/x/tools/internal/span"
15 func (r *runner) Highlight(t *testing.T, spn span.Span, spans []span.Span) {
17 for _, l := range spans {
18 expect += fmt.Sprintln(l)
20 expect = r.Normalize(expect)
23 filename := uri.Filename()
24 target := filename + ":" + fmt.Sprint(spn.Start().Line()) + ":" + fmt.Sprint(spn.Start().Column())
25 got, _ := r.NormalizeGoplsCmd(t, "highlight", target)
27 t.Errorf("highlight failed for %s expected:\n%s\ngot:\n%s", target, expect, got)