OLD | NEW |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package net | 5 package net |
6 | 6 |
7 import ( | 7 import ( |
8 "os" | 8 "os" |
9 "reflect" | 9 "reflect" |
10 "runtime" | 10 "runtime" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 {net: "tcp6", laddr: "[::]", ipv6: true}, | 82 {net: "tcp6", laddr: "[::]", ipv6: true}, |
83 | 83 |
84 {net: "tcp6", laddr: "[::1]", ipv6: true}, | 84 {net: "tcp6", laddr: "[::1]", ipv6: true}, |
85 | 85 |
86 {net: "unix", laddr: "@gotest/net", linux: true}, | 86 {net: "unix", laddr: "@gotest/net", linux: true}, |
87 {net: "unixpacket", laddr: "@gotest/net", linux: true}, | 87 {net: "unixpacket", laddr: "@gotest/net", linux: true}, |
88 } | 88 } |
89 | 89 |
90 func TestFileListener(t *testing.T) { | 90 func TestFileListener(t *testing.T) { |
91 switch runtime.GOOS { | 91 switch runtime.GOOS { |
92 » case "windows": | 92 » case "nacl", "windows": |
93 t.Skipf("skipping test on %q", runtime.GOOS) | 93 t.Skipf("skipping test on %q", runtime.GOOS) |
94 } | 94 } |
95 | 95 |
96 for _, tt := range fileListenerTests { | 96 for _, tt := range fileListenerTests { |
97 if skipServerTest(tt.net, "unix", tt.laddr, tt.ipv6, false, tt.l
inux) { | 97 if skipServerTest(tt.net, "unix", tt.laddr, tt.ipv6, false, tt.l
inux) { |
98 continue | 98 continue |
99 } | 99 } |
100 if skipServerTest(tt.net, "unixpacket", tt.laddr, tt.ipv6, false
, tt.linux) { | 100 if skipServerTest(tt.net, "unixpacket", tt.laddr, tt.ipv6, false
, tt.linux) { |
101 continue | 101 continue |
102 } | 102 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 testFilePacketConnListen(t, tt.net, tt.addr) | 196 testFilePacketConnListen(t, tt.net, tt.addr) |
197 switch tt.addr { | 197 switch tt.addr { |
198 case "", "0.0.0.0", "[::ffff:0.0.0.0]", "[::]": | 198 case "", "0.0.0.0", "[::ffff:0.0.0.0]", "[::]": |
199 default: | 199 default: |
200 if tt.net != "unixgram" { | 200 if tt.net != "unixgram" { |
201 testFilePacketConnDial(t, tt.net, tt.addr) | 201 testFilePacketConnDial(t, tt.net, tt.addr) |
202 } | 202 } |
203 } | 203 } |
204 } | 204 } |
205 } | 205 } |
OLD | NEW |