(t *testing.T, title string, f func() ([]string, error), res []string)
| 21 | ) |
| 22 | |
| 23 | func 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 | |
| 37 | func TestGetList(t *testing.T) { |
| 38 | e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv") |
no test coverage detected
searching dependent graphs…