MCPcopy Create free account
hub / github.com/valyala/bytebufferpool / testIndex

Function testIndex

pool_test.go:26–31  ·  view source on GitHub ↗
(t *testing.T, n, expectedIdx int)

Source from the content-addressed store, hash-verified

24}
25
26func testIndex(t *testing.T, n, expectedIdx int) {
27 idx := index(n)
28 if idx != expectedIdx {
29 t.Fatalf("unexpected idx for n=%d: %d. Expecting %d", n, idx, expectedIdx)
30 }
31}
32
33func TestPoolCalibrate(t *testing.T) {
34 for i := 0; i < steps*calibrateCallsThreshold; i++ {

Callers 1

TestIndexFunction · 0.85

Calls 1

indexFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…