MCPcopy Create free account
hub / github.com/eth-easl/dirigent / TestKeysValues

Function TestKeysValues

pkg/map/maps_test.go:33–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31)
32
33func TestKeysValues(t *testing.T) {
34 mp := make(map[string]string)
35 mp["paris"] = "france"
36 mp["london"] = "uk"
37
38 assert.Len(t, Keys(mp), 2)
39 assert.Len(t, Values(mp), 2)
40
41 mp["roma"] = "italy"
42 mp["bern"] = "switzerland"
43
44 assert.Len(t, Keys(mp), 4)
45 assert.Len(t, Values(mp), 4)
46}
47
48func TestDifference(t *testing.T) {
49 slice1 := []int{1, 2, 3, 4}

Callers

nothing calls this directly

Calls 3

KeysFunction · 0.85
ValuesFunction · 0.85
LenMethod · 0.65

Tested by

no test coverage detected