(validator revel.Validator, tests []Expect, t *testing.T)
| 28 | } |
| 29 | |
| 30 | func performTests(validator revel.Validator, tests []Expect, t *testing.T) { |
| 31 | for _, test := range tests { |
| 32 | if validator.IsSatisfied(test.input) != test.expectedResult { |
| 33 | if test.expectedResult { |
| 34 | t.Errorf(noErrorsMessage, reflect.TypeOf(validator), test.errorMessage) |
| 35 | } else { |
| 36 | t.Errorf(errorsMessage, reflect.TypeOf(validator), test.errorMessage) |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | func TestRequired(t *testing.T) { |
| 43 | tests := []Expect{ |
no test coverage detected