1
// Copyright 2011 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
13
func TestNoRaceChanSync(t *testing.T) {
24
func TestNoRaceChanSyncRev(t *testing.T) {
35
func TestNoRaceChanAsync(t *testing.T) {
37
c := make(chan int, 10)
46
func TestRaceChanAsyncRev(t *testing.T) {
48
c := make(chan int, 10)
57
func TestNoRaceChanAsyncCloseRecv(t *testing.T) {
59
c := make(chan int, 10)
73
func TestNoRaceChanAsyncCloseRecv2(t *testing.T) {
75
c := make(chan int, 10)
84
func TestNoRaceChanAsyncCloseRecv3(t *testing.T) {
86
c := make(chan int, 10)
96
func TestNoRaceChanSyncCloseRecv(t *testing.T) {
112
func TestNoRaceChanSyncCloseRecv2(t *testing.T) {
123
func TestNoRaceChanSyncCloseRecv3(t *testing.T) {
135
func TestRaceChanSyncCloseSend(t *testing.T) {
151
func TestRaceChanAsyncCloseSend(t *testing.T) {
153
c := make(chan int, 10)
169
func TestRaceChanCloseClose(t *testing.T) {
170
compl := make(chan bool, 2)
176
if recover() != nil {
186
if recover() != nil {
198
func TestRaceChanSendLen(t *testing.T) {
200
c := make(chan int, 10)
211
func TestRaceChanRecvLen(t *testing.T) {
213
c := make(chan int, 10)
225
func TestRaceChanSendSend(t *testing.T) {
226
compl := make(chan bool, 2)
229
c := make(chan int, 1)
252
func TestNoRaceChanPtr(t *testing.T) {
264
func TestRaceChanWrongSend(t *testing.T) {
267
c := make(chan int, 2)
284
func TestRaceChanWrongClose(t *testing.T) {
287
c := make(chan int, 1)
301
if _, who := <-c; who {
308
func TestRaceChanSendClose(t *testing.T) {
309
compl := make(chan bool, 2)
310
c := make(chan int, 1)
327
func TestNoRaceProducerConsumerUnbuffered(t *testing.T) {
333
queue := make(chan Task)
341
doit := func(f func()) {
342
done := make(chan bool, 1)
343
queue <- Task{f, done}
354
func TestRaceChanItselfSend(t *testing.T) {
355
compl := make(chan bool, 1)
356
c := make(chan int, 10)
361
c = make(chan int, 20)
365
func TestRaceChanItselfRecv(t *testing.T) {
366
compl := make(chan bool, 1)
367
c := make(chan int, 10)
374
c = make(chan int, 20)
378
func TestRaceChanItselfNil(t *testing.T) {
379
c := make(chan int, 10)
388
func TestRaceChanItselfClose(t *testing.T) {
389
compl := make(chan bool, 1)
399
func TestRaceChanItselfLen(t *testing.T) {
400
compl := make(chan bool, 1)
410
func TestRaceChanItselfCap(t *testing.T) {
411
compl := make(chan bool, 1)
421
func TestRaceChanCloseLen(t *testing.T) {
423
c := make(chan int, 10)
434
func TestRaceChanSameCell(t *testing.T) {
435
c := make(chan int, 1)
448
func TestRaceChanCloseSend(t *testing.T) {
449
compl := make(chan bool, 1)
450
c := make(chan int, 10)