aboutsummaryrefslogtreecommitdiff
path: root/src/path
diff options
context:
space:
mode:
authorJohn Gibb <johngibb@gmail.com>2018-07-29 15:19:17 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2018-07-29 19:18:48 +0000
commitf6a5fada277c7fe8f8ffca9109392c66436a15fc (patch)
tree2a2b112c4ea1d69166699c05c5548700b855d54b /src/path
parent154394f8d35ebd084f27132396d90309646cafcf (diff)
downloadgo-f6a5fada277c7fe8f8ffca9109392c66436a15fc.tar.gz
go-f6a5fada277c7fe8f8ffca9109392c66436a15fc.zip
path: present the correct 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. Change-Id: Id86ea89d6f41f25bfa164acc50142ae8ff0ec410 GitHub-Last-Rev: c220374845667942c608c02afadff95443e2ec20 GitHub-Pull-Request: golang/go#26674 Reviewed-on: https://go-review.googlesource.com/126619 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/path')
-rw-r--r--src/path/match_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path/match_test.go b/src/path/match_test.go
index 6b0676f81f..127180e570 100644
--- a/src/path/match_test.go
+++ b/src/path/match_test.go
@@ -73,7 +73,7 @@ func TestMatch(t *testing.T) {
for _, tt := range matchTests {
ok, err := Match(tt.pattern, tt.s)
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)
}
}
}