Commit 1b2e435b authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

runtime: fix typos in test

I don't know what is n, but it exists somewhere there.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/58710043
parent 99a1e762
...@@ -136,10 +136,10 @@ func TestChan(t *testing.T) { ...@@ -136,10 +136,10 @@ func TestChan(t *testing.T) {
for i := 0; i < 100; i++ { for i := 0; i < 100; i++ {
v, ok := <-c v, ok := <-c
if !ok { if !ok {
t.Fatalf("chan[%d]: receive failed, expected %v", n, i) t.Fatalf("chan[%d]: receive failed, expected %v", chanCap, i)
} }
if v != i { if v != i {
t.Fatalf("chan[%d]: received %v, expected %v", n, v, i) t.Fatalf("chan[%d]: received %v, expected %v", chanCap, v, i)
} }
} }
...@@ -172,11 +172,11 @@ func TestChan(t *testing.T) { ...@@ -172,11 +172,11 @@ func TestChan(t *testing.T) {
} }
} }
if len(recv) != L { if len(recv) != L {
t.Fatalf("chan[%d]: received %v values, expected %v", n, len(recv), L) t.Fatalf("chan[%d]: received %v values, expected %v", chanCap, len(recv), L)
} }
for _, v := range recv { for _, v := range recv {
if v != P { if v != P {
t.Fatalf("chan[%d]: received %v values, expected %v", n, v, P) t.Fatalf("chan[%d]: received %v values, expected %v", chanCap, v, P)
} }
} }
} }
......
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