func (*AddressSuite) TestNetAddr(c *gc.C) { for i, test := range netAddrTests { c.Logf("test %d: %q", i, test.addr) hp := network.HostPort{ Address: test.addr, Port: test.port, } c.Assert(hp.NetAddr(), gc.Equals, test.expect) } }
func (*HostPortSuite) TestNetAddrAndString(c *gc.C) { for i, test := range netAddrTests { c.Logf("test %d: %q", i, test.addr) hp := network.HostPort{ Address: test.addr, Port: test.port, } c.Check(hp.NetAddr(), gc.Equals, test.expect) c.Check(hp.String(), gc.Equals, test.expect) c.Check(hp.GoString(), gc.Equals, test.expect) } }