go/packages: remove POSIX filename assumption from test

Change-Id: If1aac9f109b05897b21a2f27a4050fbee2cc2d2e
Reviewed-on: https://go-review.googlesource.com/123357
Run-TryBot: Alan Donovan <adonovan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Alan Donovan 2018-07-11 16:27:19 -04:00
parent 9622293277
commit 2087f8c107
1 changed files with 3 additions and 3 deletions

View File

@ -345,9 +345,9 @@ func TestWholeProgramOverlay(t *testing.T) {
}{ }{
{nil, `"abc"`, nil}, // default {nil, `"abc"`, nil}, // default
{M{}, `"abc"`, nil}, // empty overlay {M{}, `"abc"`, nil}, // empty overlay
{M{tmp + "/src/c/c.go": `package c; const C = "C"`}, `"abC"`, nil}, {M{filepath.Join(tmp, "src/c/c.go"): `package c; const C = "C"`}, `"abC"`, nil},
{M{tmp + "/src/b/b.go": `package b; import "c"; const B = "B" + c.C`}, `"aBc"`, nil}, {M{filepath.Join(tmp, "src/b/b.go"): `package b; import "c"; const B = "B" + c.C`}, `"aBc"`, nil},
{M{tmp + "/src/b/b.go": `package b; import "d"; const B = "B" + d.D`}, `unknown`, {M{filepath.Join(tmp, "src/b/b.go"): `package b; import "d"; const B = "B" + d.D`}, `unknown`,
[]string{`could not import d (no metadata for d)`}}, []string{`could not import d (no metadata for d)`}},
} { } {
var parseFile func(fset *token.FileSet, filename string) (*ast.File, error) var parseFile func(fset *token.FileSet, filename string) (*ast.File, error)