Skip to content

Commit 2a53cb3

Browse files
committed
improve GOOS=tamago test coverage
1 parent 1ece41e commit 2a53cb3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/net/dial_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ func TestDialListenerAddr(t *testing.T) {
955955
// To address both of those problems, we open a tcp4-only localhost port, but
956956
// then dial the address string that the listener would have reported for a
957957
// dual-stack port.
958-
ln, err := Listen("tcp4", ":0")
958+
ln, err := Listen("tcp4", "127.0.0.1:0")
959959
if err != nil {
960960
t.Fatal(err)
961961
}

src/net/http/transport_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -3394,6 +3394,9 @@ func testProxyForRequest(t *testing.T, tt proxyFromEnvTest, proxyForRequest func
33943394
t.Errorf("%v: got error = %q, want %q", tt, g, e)
33953395
return
33963396
}
3397+
if url == nil && tt.want == "<nil>" {
3398+
return
3399+
}
33973400
if got := fmt.Sprintf("%s", url); got != tt.want {
33983401
t.Errorf("%v: got URL = %q, want %q", tt, url, tt.want)
33993402
}

0 commit comments

Comments
 (0)