MCPcopy Create free account
hub / github.com/DNAProject/DNA / TestNewStringSet

Function TestNewStringSet

p2pserver/common/set/string_set_test.go:73–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

71}
72
73func TestNewStringSet(t *testing.T) {
74 s := NewStringSet("a", "b", "c")
75 if len(s) != 3 {
76 t.Errorf("Expected len=3: %d", len(s))
77 }
78 if !s.Has("a") || !s.Has("b") || !s.Has("c") {
79 t.Errorf("Unexpected contents: %#v", s)
80 }
81}

Callers

nothing calls this directly

Calls 3

HasMethod · 0.95
NewStringSetFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected