(t *testing.T, e *Enforcer, policy []string, res bool)
| 125 | } |
| 126 | |
| 127 | func testHasPolicy(t *testing.T, e *Enforcer, policy []string, res bool) { |
| 128 | t.Helper() |
| 129 | myRes, err := e.HasPolicy(policy) |
| 130 | if err != nil { |
| 131 | t.Error(err) |
| 132 | } |
| 133 | |
| 134 | t.Log("Has policy ", util.ArrayToString(policy), ": ", myRes) |
| 135 | |
| 136 | if res != myRes { |
| 137 | t.Error("Has policy ", util.ArrayToString(policy), ": ", myRes, ", supposed to be ", res) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func testHasGroupingPolicy(t *testing.T, e *Enforcer, policy []string, res bool) { |
| 142 | t.Helper() |
no test coverage detected
searching dependent graphs…