MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestSetFromArray

Function TestSetFromArray

channels/set_test.go:34–49  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestSetFromArray(t *testing.T) {
35 cases := [][][]string{
36 {{}, {}},
37 {{"*"}, {}},
38 {{"a"}, {"a"}},
39 {{"a", "b"}, {"a", "b"}},
40 {{"a", "a"}, {"a"}},
41 {{"a", "b", "a"}, {"a", "b"}},
42 {{"a", "*", "b"}, {"a", "b"}},
43 }
44 for _, cas := range cases {
45 channels, err := SetFromArray(cas[0], RemoveStar)
46 assert.NoError(t, err, "SetFromArray failed")
47 assert.Equal(t, BaseSetOf(t, cas[1]...), channels)
48 }
49}
50
51func TestSetFromArrayWithStar(t *testing.T) {
52 cases := [][][]string{

Callers

nothing calls this directly

Calls 3

BaseSetOfFunction · 0.85
SetFromArrayFunction · 0.70
EqualMethod · 0.45

Tested by

no test coverage detected