Commit 9bc2a334 authored by Mikio Hara's avatar Mikio Hara

internal/netreflect: fix test on nacl, plan9 and windows

Change-Id: Ia274e47affd5fc2b9bdea077fa8043887044d0ec
Reviewed-on: https://go-review.googlesource.com/28110
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 6250b412
...@@ -62,15 +62,15 @@ func newLocalPacketListener(network string) (net.PacketConn, error) { ...@@ -62,15 +62,15 @@ func newLocalPacketListener(network string) (net.PacketConn, error) {
func TestSocketOf(t *testing.T) { func TestSocketOf(t *testing.T) {
for _, network := range []string{"tcp", "unix", "unixpacket"} { for _, network := range []string{"tcp", "unix", "unixpacket"} {
switch network { switch runtime.GOOS {
case "unix": case "darwin":
switch runtime.GOOS { if network == "unixpacket" {
case "nacl", "plan9", "windows":
continue continue
} }
case "unixpacket": case "nacl", "plan9":
switch runtime.GOOS { continue
case "darwin", "nacl", "plan9", "windows": case "windows":
if network == "unix" || network == "unixpacket" {
continue continue
} }
} }
...@@ -101,10 +101,11 @@ func TestSocketOf(t *testing.T) { ...@@ -101,10 +101,11 @@ func TestSocketOf(t *testing.T) {
func TestPacketSocketOf(t *testing.T) { func TestPacketSocketOf(t *testing.T) {
for _, network := range []string{"udp", "unixgram"} { for _, network := range []string{"udp", "unixgram"} {
switch network { switch runtime.GOOS {
case "unixgram": case "nacl", "plan9":
switch runtime.GOOS { continue
case "nacl", "plan9", "windows": case "windows":
if network == "unixgram" {
continue continue
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment