Commit 60c41d1d authored by Mikio Hara's avatar Mikio Hara Committed by Matt Layher

internal/netreflect: more use of internal/nettest package

Change-Id: I4473e69bbb445ab27554f2dc625d0cbd79d7cfe5
Reviewed-on: https://go-review.googlesource.com/35072
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarMatt Layher <mdlayher@gmail.com>
parent db8e2419
......@@ -7,7 +7,6 @@ package netreflect_test
import (
"net"
"os"
"runtime"
"testing"
"golang.org/x/net/internal/netreflect"
......@@ -16,17 +15,8 @@ import (
func TestSocketOf(t *testing.T) {
for _, network := range []string{"tcp", "unix", "unixpacket"} {
switch runtime.GOOS {
case "darwin":
if network == "unixpacket" {
continue
}
case "nacl", "plan9":
if !nettest.TestableNetwork(network) {
continue
case "windows":
if network == "unix" || network == "unixpacket" {
continue
}
}
ln, err := nettest.NewLocalListener(network)
if err != nil {
......@@ -55,13 +45,8 @@ func TestSocketOf(t *testing.T) {
func TestPacketSocketOf(t *testing.T) {
for _, network := range []string{"udp", "unixgram"} {
switch runtime.GOOS {
case "nacl", "plan9":
if !nettest.TestableNetwork(network) {
continue
case "windows":
if network == "unixgram" {
continue
}
}
c, err := nettest.NewLocalPacketListener(network)
if err != nil {
......
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