1
0
mirror of https://github.com/golang/go synced 2024-11-24 04:30:14 -07:00

path: fix error message in TestMatch

The message was hardcoded to indicate that the test wanted a nil error,
even though in some cases a specific error was wanted. This patch fixes
the message to print the wanted error.
This commit is contained in:
John Gibb 2018-07-29 11:15:09 -04:00 committed by GitHub
parent 5ad0a524d2
commit c220374845
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ func TestMatch(t *testing.T) {
for _, tt := range matchTests { for _, tt := range matchTests {
ok, err := Match(tt.pattern, tt.s) ok, err := Match(tt.pattern, tt.s)
if ok != tt.match || err != tt.err { if ok != tt.match || err != tt.err {
t.Errorf("Match(%#q, %#q) = %v, %v want %v, nil", tt.pattern, tt.s, ok, err, tt.match) t.Errorf("Match(%#q, %#q) = %v, %v want %v, %v", tt.pattern, tt.s, ok, err, tt.match, tt.err)
} }
} }
} }