(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestNoError(t *testing.T) { |
| 92 | e, _ := NewEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
| 93 | |
| 94 | err := e.LoadModel() |
| 95 | if err != nil { |
| 96 | t.Errorf("Should be no error here.") |
| 97 | t.Log("Unexpected error: ") |
| 98 | t.Log(err.Error()) |
| 99 | } |
| 100 | |
| 101 | err = e.LoadPolicy() |
| 102 | if err != nil { |
| 103 | t.Errorf("Should be no error here.") |
| 104 | t.Log("Unexpected error: ") |
| 105 | t.Log(err.Error()) |
| 106 | } |
| 107 | |
| 108 | err = e.SavePolicy() |
| 109 | if err != nil { |
| 110 | t.Errorf("Should be no error here.") |
| 111 | t.Log("Unexpected error: ") |
| 112 | t.Log(err.Error()) |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func TestModelNoError(t *testing.T) { |
| 117 | e, _ := NewEnforcer("examples/basic_model.conf", "examples/basic_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…