MCPcopy Create free account
hub / github.com/facebook/time / TestGetMultipleKeys

Function TestGetMultipleKeys

fbclock/stats/stats_test.go:74–84  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

72 require.Equal(t, int64(42), s.Get()["key"])
73}
74
75func TestGetMultipleKeys(t *testing.T) {
76 s := NewStats()
77 s.SetCounter("a", 1)
78 s.SetCounter("b", 2)
79 s.SetCounter("c", 3)
80 got := s.Get()
81 require.Equal(t, int64(1), got["a"])
82 require.Equal(t, int64(2), got["b"])
83 require.Equal(t, int64(3), got["c"])
84 require.Len(t, got, 3)
85}
86
87func TestCopy(t *testing.T) {

Callers

nothing calls this directly

Calls 4

SetCounterMethod · 0.95
GetMethod · 0.95
LenMethod · 0.80
NewStatsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…