File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ package netreflect_test
77import (
88 "net"
99 "os"
10- "runtime"
1110 "testing"
1211
1312 "golang.org/x/net/internal/netreflect"
@@ -16,17 +15,8 @@ import (
1615
1716func TestSocketOf (t * testing.T ) {
1817 for _ , network := range []string {"tcp" , "unix" , "unixpacket" } {
19- switch runtime .GOOS {
20- case "darwin" :
21- if network == "unixpacket" {
22- continue
23- }
24- case "nacl" , "plan9" :
18+ if ! nettest .TestableNetwork (network ) {
2519 continue
26- case "windows" :
27- if network == "unix" || network == "unixpacket" {
28- continue
29- }
3020 }
3121 ln , err := nettest .NewLocalListener (network )
3222 if err != nil {
@@ -55,13 +45,8 @@ func TestSocketOf(t *testing.T) {
5545
5646func TestPacketSocketOf (t * testing.T ) {
5747 for _ , network := range []string {"udp" , "unixgram" } {
58- switch runtime .GOOS {
59- case "nacl" , "plan9" :
48+ if ! nettest .TestableNetwork (network ) {
6049 continue
61- case "windows" :
62- if network == "unixgram" {
63- continue
64- }
6550 }
6651 c , err := nettest .NewLocalPacketListener (network )
6752 if err != nil {
You can’t perform that action at this time.
0 commit comments