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

Function TestSetFromArrayWithStar

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

Source from the content-addressed store, hash-verified

49}
50
51func TestSetFromArrayWithStar(t *testing.T) {
52 cases := [][][]string{
53 {{}, {}},
54 {{"*"}, {"*"}},
55 {{"a"}, {"a"}},
56 {{"a", "b"}, {"a", "b"}},
57 {{"a", "a"}, {"a"}},
58 {{"a", "b", "a"}, {"a", "b"}},
59 {{"a", "*", "b"}, {"*"}},
60 }
61 for _, cas := range cases {
62 channels, err := SetFromArray(cas[0], ExpandStar)
63 assert.NoError(t, err, "SetFromArray failed")
64 assert.Equal(t, BaseSetOf(t, cas[1]...), channels)
65 }
66}
67
68func TestSetFromArrayError(t *testing.T) {
69 _, err := SetFromArray([]string{""}, RemoveStar)

Callers

nothing calls this directly

Calls 3

BaseSetOfFunction · 0.85
SetFromArrayFunction · 0.70
EqualMethod · 0.45

Tested by

no test coverage detected