(t *testing.T, name string, in InChannel, out OutChannel)
| 22 | } |
| 23 | |
| 24 | func testChannelPair(t *testing.T, name string, in InChannel, out OutChannel) { |
| 25 | go func() { |
| 26 | for i := 0; i < 1000; i++ { |
| 27 | in.In() <- i |
| 28 | } |
| 29 | in.Close() |
| 30 | }() |
| 31 | for i := 0; i < 1000; i++ { |
| 32 | val := <-out.Out() |
| 33 | if i != val.(int) { |
| 34 | t.Fatal("pair", name, "expected", i, "but got", val.(int)) |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func testChannelConcurrentAccessors(t *testing.T, name string, ch Channel) { |
| 40 | // no asserts here, this is just for the race detector's benefit |
no test coverage detected
searching dependent graphs…