(t *testing.T, e *Enforcer, res [][]string)
| 55 | } |
| 56 | |
| 57 | func testGetPolicy(t *testing.T, e *Enforcer, res [][]string) { |
| 58 | t.Helper() |
| 59 | myRes, err := e.GetPolicy() |
| 60 | if err != nil { |
| 61 | t.Error(err) |
| 62 | } |
| 63 | |
| 64 | t.Log("Policy: ", myRes) |
| 65 | |
| 66 | if !util.SortedArray2DEquals(res, myRes) { |
| 67 | t.Error("Policy: ", myRes, ", supposed to be ", res) |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | func testGetFilteredPolicy(t *testing.T, e *Enforcer, fieldIndex int, res [][]string, fieldValues ...string) { |
| 72 | t.Helper() |
no test coverage detected
searching dependent graphs…