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,18 +15,9 @@ import (
func TestSocketOf(t *testing.T) {
for _, network := range []string{"tcp", "unix", "unixpacket"} {
switch runtime.GOOS {
case "darwin":
if network == "unixpacket" {
if !nettest.TestableNetwork(network) {
continue
}
case "nacl", "plan9":
continue
case "windows":
if network == "unix" || network == "unixpacket" {
continue
}
}
ln, err := nettest.NewLocalListener(network)
if err != nil {
t.Error(err)
......@@ -55,14 +45,9 @@ func TestSocketOf(t *testing.T) {
func TestPacketSocketOf(t *testing.T) {
for _, network := range []string{"udp", "unixgram"} {
switch runtime.GOOS {
case "nacl", "plan9":
continue
case "windows":
if network == "unixgram" {
if !nettest.TestableNetwork(network) {
continue
}
}
c, err := nettest.NewLocalPacketListener(network)
if err != nil {
t.Error(err)
......
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