mirror of
https://github.com/golang/go.git
synced 2025-11-02 01:30:55 +00:00
net: simplify error messages in tests
This change simplifies unnecessarily redundant error messages in tests. There's no need to worry any more because package APIs now return consistent, self-descriptive error values. Alos renames ambiguous test functions and makes use of test tables. Change-Id: I7b61027607c4ae2a3cf605d08d58cf449fa27eb2 Reviewed-on: https://go-review.googlesource.com/9662 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
This commit is contained in:
parent
9b184fd23c
commit
f77e10fb2e
29 changed files with 307 additions and 320 deletions
|
|
@ -16,9 +16,9 @@ func TestCgoLookupIP(t *testing.T) {
|
|||
t.Errorf("cgoLookupIP must not be a placeholder")
|
||||
}
|
||||
if err != nil {
|
||||
t.Errorf("cgoLookupIP failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
if _, err := goLookupIP(host); err != nil {
|
||||
t.Errorf("goLookupIP failed: %v", err)
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue