diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-05-23 09:45:29 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-05-23 11:04:16 +0200 |
commit | 4e5e42a1c1a9eb757743648c48df70cbd42635db (patch) | |
tree | 64220a5cf0a1ad27206bbcdbc810ea56ba5ed67f /src/pkg/net/file_test.go | |
parent | fd089e27d7260cee1c7ca449c41cdd0341ebc6cb (diff) | |
download | golang-4e5e42a1c1a9eb757743648c48df70cbd42635db.tar.gz |
Imported Upstream version 2011.05.22
Diffstat (limited to 'src/pkg/net/file_test.go')
-rw-r--r-- | src/pkg/net/file_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/net/file_test.go b/src/pkg/net/file_test.go index 1ec05fdee..bd1e2c9d7 100644 --- a/src/pkg/net/file_test.go +++ b/src/pkg/net/file_test.go @@ -62,7 +62,7 @@ func TestFileListener(t *testing.T) { } testFileListener(t, "tcp", "127.0.0.1") testFileListener(t, "tcp", "127.0.0.1") - if kernelSupportsIPv6() { + if supportsIPv6 && supportsIPv4map { testFileListener(t, "tcp", "[::ffff:127.0.0.1]") testFileListener(t, "tcp", "127.0.0.1") testFileListener(t, "tcp", "[::ffff:127.0.0.1]") @@ -121,8 +121,10 @@ func TestFilePacketConn(t *testing.T) { } testFilePacketConnListen(t, "udp", "127.0.0.1:0") testFilePacketConnDial(t, "udp", "127.0.0.1:12345") - if kernelSupportsIPv6() { + if supportsIPv6 { testFilePacketConnListen(t, "udp", "[::1]:0") + } + if supportsIPv6 && supportsIPv4map { testFilePacketConnDial(t, "udp", "[::ffff:127.0.0.1]:12345") } if syscall.OS == "linux" { |