mirror of
https://github.com/golang/go
synced 2024-11-22 05:34:39 -07:00
net: remove unnecessary newline in testing.Logf from tests
R=golang-dev, r CC=golang-dev https://golang.org/cl/6434043
This commit is contained in:
parent
d380a97750
commit
3a112a8112
@ -24,7 +24,7 @@ func TestInterfaces(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Interfaces failed: %v", err)
|
t.Fatalf("Interfaces failed: %v", err)
|
||||||
}
|
}
|
||||||
t.Logf("table: len/cap = %v/%v\n", len(ift), cap(ift))
|
t.Logf("table: len/cap = %v/%v", len(ift), cap(ift))
|
||||||
|
|
||||||
for _, ifi := range ift {
|
for _, ifi := range ift {
|
||||||
ifxi, err := InterfaceByIndex(ifi.Index)
|
ifxi, err := InterfaceByIndex(ifi.Index)
|
||||||
@ -41,7 +41,7 @@ func TestInterfaces(t *testing.T) {
|
|||||||
if !sameInterface(ifxn, &ifi) {
|
if !sameInterface(ifxn, &ifi) {
|
||||||
t.Fatalf("InterfaceByName(%q) = %v, want %v", ifi.Name, *ifxn, ifi)
|
t.Fatalf("InterfaceByName(%q) = %v, want %v", ifi.Name, *ifxn, ifi)
|
||||||
}
|
}
|
||||||
t.Logf("%q: flags %q, ifindex %v, mtu %v\n", ifi.Name, ifi.Flags.String(), ifi.Index, ifi.MTU)
|
t.Logf("%q: flags %q, ifindex %v, mtu %v", ifi.Name, ifi.Flags.String(), ifi.Index, ifi.MTU)
|
||||||
t.Logf("\thardware address %q", ifi.HardwareAddr.String())
|
t.Logf("\thardware address %q", ifi.HardwareAddr.String())
|
||||||
testInterfaceAddrs(t, &ifi)
|
testInterfaceAddrs(t, &ifi)
|
||||||
testInterfaceMulticastAddrs(t, &ifi)
|
testInterfaceMulticastAddrs(t, &ifi)
|
||||||
@ -53,7 +53,7 @@ func TestInterfaceAddrs(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("InterfaceAddrs failed: %v", err)
|
t.Fatalf("InterfaceAddrs failed: %v", err)
|
||||||
}
|
}
|
||||||
t.Logf("table: len/cap = %v/%v\n", len(ifat), cap(ifat))
|
t.Logf("table: len/cap = %v/%v", len(ifat), cap(ifat))
|
||||||
testAddrs(t, ifat)
|
testAddrs(t, ifat)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ func testAddrs(t *testing.T, ifat []Addr) {
|
|||||||
for _, ifa := range ifat {
|
for _, ifa := range ifat {
|
||||||
switch ifa.(type) {
|
switch ifa.(type) {
|
||||||
case *IPAddr, *IPNet:
|
case *IPAddr, *IPNet:
|
||||||
t.Logf("\tinterface address %q\n", ifa.String())
|
t.Logf("\tinterface address %q", ifa.String())
|
||||||
default:
|
default:
|
||||||
t.Errorf("\tunexpected type: %T", ifa)
|
t.Errorf("\tunexpected type: %T", ifa)
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ func testMulticastAddrs(t *testing.T, ifmat []Addr) {
|
|||||||
for _, ifma := range ifmat {
|
for _, ifma := range ifmat {
|
||||||
switch ifma.(type) {
|
switch ifma.(type) {
|
||||||
case *IPAddr:
|
case *IPAddr:
|
||||||
t.Logf("\tjoined group address %q\n", ifma.String())
|
t.Logf("\tjoined group address %q", ifma.String())
|
||||||
default:
|
default:
|
||||||
t.Errorf("\tunexpected type: %T", ifma)
|
t.Errorf("\tunexpected type: %T", ifma)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user