MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestMapKeysToSlice

Function TestMapKeysToSlice

pkg/util/convert/convert_test.go:26–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestMapKeysToSlice(t *testing.T) {
27 m := map[uint32]bool{1245: true, 2233: false, 341234: true}
28 s := MapKeysToSlice(m)
29 assert.Len(t, s, 3)
30 assert.Contains(t, s, uint32(1245))
31 assert.Contains(t, s, uint32(341234))
32}

Callers

nothing calls this directly

Calls 3

MapKeysToSliceFunction · 0.85
ContainsMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected