mirror of
https://github.com/golang/go
synced 2024-11-25 08:07:57 -07:00
go/printer: show that input file is formatted in TestFiles error message
Currently when one of the tests TestFiles fails, then the error looks like this: --- testdata/generics.input +++ testdata/generics.golden which is confusing, with this change it will be: --- format(testdata/generics.input) +++ testdata/generics.golden Change-Id: I4b471ab57b14ac63ed8ff244cc331e645478b414
This commit is contained in:
parent
2707d42966
commit
aedafc05fd
@ -125,7 +125,7 @@ func runcheck(t *testing.T, source, golden string, mode checkMode) {
|
||||
}
|
||||
|
||||
// formatted source and golden must be the same
|
||||
if err := checkEqual(source, golden, res, gld); err != nil {
|
||||
if err := checkEqual(fmt.Sprintf("format(%v)", source), golden, res, gld); err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user