mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
internal/nettest: add js/wasm architecture
This commit adds the js/wasm architecture to the internal/nettest package. js/wasm currently uses the same fake networking as nacl. Support for real networking will be added later. Related to https://go-review.googlesource.com/c/go/+/109995 Change-Id: Ic914175374d7588dcb3c078da0e0e71c88323d1a Reviewed-on: https://go-review.googlesource.com/110895 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
5f9ae10d9a
commit
640f4622ab
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build nacl plan9
|
||||
// +build js,wasm nacl plan9
|
||||
|
||||
package nettest
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ func TestableNetwork(network string) bool {
|
||||
switch network {
|
||||
case "unix", "unixgram":
|
||||
switch runtime.GOOS {
|
||||
case "android", "nacl", "plan9", "windows":
|
||||
case "android", "js", "nacl", "plan9", "windows":
|
||||
return false
|
||||
}
|
||||
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
|
||||
@@ -72,7 +72,7 @@ func TestableNetwork(network string) bool {
|
||||
}
|
||||
case "unixpacket":
|
||||
switch runtime.GOOS {
|
||||
case "android", "darwin", "freebsd", "nacl", "plan9", "windows":
|
||||
case "android", "darwin", "freebsd", "js", "nacl", "plan9", "windows":
|
||||
return false
|
||||
case "netbsd":
|
||||
// It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown.
|
||||
|
||||
Reference in New Issue
Block a user