MCPcopy
hub / github.com/prometheus/client_golang / TestCurryVecWithCollisions

Function TestCurryVecWithCollisions

prometheus/vec_test.go:460–471  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

458}
459
460func TestCurryVecWithCollisions(t *testing.T) {
461 vec := NewCounterVec(
462 CounterOpts{
463 Name: "test",
464 Help: "helpless",
465 },
466 []string{"one", "two", "three"},
467 )
468 vec.hashAdd = func(h uint64, s string) uint64 { return 1 }
469 vec.hashAddByte = func(h uint64, b byte) uint64 { return 1 }
470 testCurryVec(t, vec)
471}
472
473func TestCurryVecWithConstraints(t *testing.T) {
474 constraint := func(s string) string { return "x" + s }

Callers

nothing calls this directly

Calls 2

testCurryVecFunction · 0.85
NewCounterVecFunction · 0.70

Tested by

no test coverage detected