Home | History | Annotate | Download | only in sync

Lines Matching refs:Once

18 func run(t *testing.T, once *Once, o *one, c chan bool) {
19 once.Do(func() { o.Increment() })
21 t.Errorf("once failed inside run: %d is not 1", v)
28 once := new(Once)
32 go run(t, once, o, c)
38 t.Errorf("once failed outside run: %d is not 1", *o)
43 var once Once
47 t.Fatalf("Once.Do did not panic")
50 once.Do(func() {
55 once.Do(func() {
56 t.Fatalf("Once.Do called twice")
61 var once Once
65 once.Do(f)