Skip to content

Commit 9bc2a33

Browse files
committed
internal/netreflect: fix test on nacl, plan9 and windows
Change-Id: Ia274e47affd5fc2b9bdea077fa8043887044d0ec Reviewed-on: https://go-review.googlesource.com/28110 Run-TryBot: Mikio Hara <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 6250b41 commit 9bc2a33

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

internal/netreflect/socket_test.go

+12-11
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ func newLocalPacketListener(network string) (net.PacketConn, error) {
6262

6363
func TestSocketOf(t *testing.T) {
6464
for _, network := range []string{"tcp", "unix", "unixpacket"} {
65-
switch network {
66-
case "unix":
67-
switch runtime.GOOS {
68-
case "nacl", "plan9", "windows":
65+
switch runtime.GOOS {
66+
case "darwin":
67+
if network == "unixpacket" {
6968
continue
7069
}
71-
case "unixpacket":
72-
switch runtime.GOOS {
73-
case "darwin", "nacl", "plan9", "windows":
70+
case "nacl", "plan9":
71+
continue
72+
case "windows":
73+
if network == "unix" || network == "unixpacket" {
7474
continue
7575
}
7676
}
@@ -101,10 +101,11 @@ func TestSocketOf(t *testing.T) {
101101

102102
func TestPacketSocketOf(t *testing.T) {
103103
for _, network := range []string{"udp", "unixgram"} {
104-
switch network {
105-
case "unixgram":
106-
switch runtime.GOOS {
107-
case "nacl", "plan9", "windows":
104+
switch runtime.GOOS {
105+
case "nacl", "plan9":
106+
continue
107+
case "windows":
108+
if network == "unixgram" {
108109
continue
109110
}
110111
}

0 commit comments

Comments
 (0)