]> Cypherpunks repositories - gostls13.git/commitdiff
net: disable WriteMsgUDP tests on nacl, windows (fix build)
authorMikio Hara <mikioh.mikioh@gmail.com>
Tue, 10 Feb 2015 08:21:03 +0000 (17:21 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 10 Feb 2015 23:21:40 +0000 (23:21 +0000)
Change-Id: I695b89ec2b63233d94c49c4a40a57b50350ec67c
Reviewed-on: https://go-review.googlesource.com/4350
TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/udp_test.go

index d291b26fd5bf8fce58bb1491f6881b2b7e4772d3..2be2c319a70dbb98d07cce81331e013f5ce4b879 100644 (file)
@@ -132,8 +132,13 @@ func testWriteToConn(t *testing.T, raddr string) {
                t.Fatalf("WriteMsgUDP should fail as ErrWriteToConnected: %v", err)
        }
        _, _, err = c.(*UDPConn).WriteMsgUDP([]byte("Connection-oriented mode socket"), nil, nil)
-       if err != nil {
-               t.Fatal(err)
+       switch runtime.GOOS {
+       case "nacl", "windows": // see golang.org/issue/9252
+               t.Skipf("not implemented yet on %s", runtime.GOOS)
+       default:
+               if err != nil {
+                       t.Fatal(err)
+               }
        }
 }
 
@@ -172,8 +177,13 @@ func testWriteToPacketConn(t *testing.T, raddr string) {
                t.Fatalf("WriteMsgUDP should fail as errMissingAddress: %v", err)
        }
        _, _, err = c.(*UDPConn).WriteMsgUDP([]byte("Connection-less mode socket"), nil, ra)
-       if err != nil {
-               t.Fatal(err)
+       switch runtime.GOOS {
+       case "nacl", "windows": // see golang.org/issue/9252
+               t.Skipf("not implemented yet on %s", runtime.GOOS)
+       default:
+               if err != nil {
+                       t.Fatal(err)
+               }
        }
 }