MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestChan_C

Function TestChan_C

internal/utils/percpu/chan_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestChan_C(t *testing.T) {
12 var c = percpu.NewChan[zero.Zero](10)
13 c.C() <- zero.Zero{}
14
15 t.Log(<-c.C())
16
17 select {
18 case <-c.C():
19 t.Fatal("should not return from here")
20 default:
21 t.Log("ok")
22 }
23}

Callers

nothing calls this directly

Calls 2

CMethod · 0.80
LogMethod · 0.80

Tested by

no test coverage detected