net: disable tests for functions not available on windows

R=r, Joe Poirier, rsc
CC=golang-dev
https://golang.org/cl/2123044
This commit is contained in:
Alex Brainman 2010-09-12 12:02:29 +10:00
parent f95a2f2b97
commit e3a0c2f6cf
6 changed files with 25 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import (
"strings"
"syscall"
"testing"
"runtime"
)
// Do not test empty datagrams by default.
@ -108,6 +109,10 @@ func TestTCPServer(t *testing.T) {
}
func TestUnixServer(t *testing.T) {
// "unix" sockets are not supported on windows.
if runtime.GOOS == "windows" {
return
}
os.Remove("/tmp/gotest.net")
doTest(t, "unix", "/tmp/gotest.net", "/tmp/gotest.net")
os.Remove("/tmp/gotest.net")
@ -177,6 +182,10 @@ func TestUDPServer(t *testing.T) {
}
func TestUnixDatagramServer(t *testing.T) {
// "unix" sockets are not supported on windows.
if runtime.GOOS == "windows" {
return
}
for _, isEmpty := range []bool{false} {
os.Remove("/tmp/gotest1.net")
os.Remove("/tmp/gotest1.net.local")