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:
Mikio Hara 2015-05-01 12:38:42 +09:00
parent 9b184fd23c
commit f77e10fb2e
29 changed files with 307 additions and 320 deletions

View file

@ -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)
}
}