MCPcopy Index your code
hub / github.com/apache/casbin / testStringList

Function testStringList

management_api_test.go:23–35  ·  view source on GitHub ↗
(t *testing.T, title string, f func() ([]string, error), res []string)

Source from the content-addressed store, hash-verified

21)
22
23func testStringList(t *testing.T, title string, f func() ([]string, error), res []string) {
24 t.Helper()
25 myRes, err := f()
26 if err != nil {
27 t.Error(err)
28 }
29
30 t.Log(title+": ", myRes)
31
32 if !util.ArrayEquals(res, myRes) {
33 t.Error(title+": ", myRes, ", supposed to be ", res)
34 }
35}
36
37func TestGetList(t *testing.T) {
38 e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv")

Callers 2

TestGetListFunction · 0.85
TestGetListWithDomainsFunction · 0.85

Calls 2

ArrayEqualsFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…