Commit a5c5f6ea authored by Alberto Donizetti's avatar Alberto Donizetti Committed by Brad Fitzpatrick

all: fix copy-and-paste errors in tests

Fixes #15570

Change-Id: I95d1ac26e342c3bbf36ad1f0209711ea96eaf487
Reviewed-on: https://go-review.googlesource.com/22870Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent c81a3532
......@@ -1253,7 +1253,7 @@ func TestIgnoreInterface(t *testing.T) {
if item2.I != item1.I {
t.Error("normal int did not decode correctly")
}
if item2.F != item2.F {
if item2.F != item1.F {
t.Error("normal float did not decode correctly")
}
}
......@@ -1280,7 +1280,7 @@ func TestUnexportedFields(t *testing.T) {
if err != nil {
t.Fatal("decode error:", err)
}
if u0.A != u0.A || u0.B != u1.B || u0.D != u1.D {
if u0.A != u1.A || u0.B != u1.B || u0.D != u1.D {
t.Errorf("u1->u0: expected %v; got %v", u0, u1)
}
if u1.c != 1234. {
......
......@@ -43,7 +43,7 @@ func TestConnAndListener(t *testing.T) {
t.Fatal(err)
}
defer c.Close()
if c.LocalAddr().Network() != network || c.LocalAddr().Network() != network {
if c.LocalAddr().Network() != network || c.RemoteAddr().Network() != network {
t.Fatalf("got %s->%s; want %s->%s", c.LocalAddr().Network(), c.RemoteAddr().Network(), network, network)
}
c.SetDeadline(time.Now().Add(someTimeout))
......
......@@ -228,7 +228,7 @@ func transponder(ln Listener, ch chan<- error) {
defer c.Close()
network := ln.Addr().Network()
if c.LocalAddr().Network() != network || c.LocalAddr().Network() != network {
if c.LocalAddr().Network() != network || c.RemoteAddr().Network() != network {
ch <- fmt.Errorf("got %v->%v; expected %v->%v", c.LocalAddr().Network(), c.RemoteAddr().Network(), network, network)
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment