MCPcopy
hub / github.com/revel/revel / performTests

Function performTests

validators_test.go:30–40  ·  view source on GitHub ↗
(validator revel.Validator, tests []Expect, t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func 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
42func TestRequired(t *testing.T) {
43 tests := []Expect{

Callers 15

TestRequiredFunction · 0.85
TestMinFunction · 0.85
TestMaxFunction · 0.85
TestRangeFunction · 0.85
TestMinSizeFunction · 0.85
TestMaxSizeFunction · 0.85
TestLengthFunction · 0.85
TestMatchFunction · 0.85
runIPAddrTestfuncFunction · 0.85
TestMacAddrFunction · 0.85
TestDomainFunction · 0.85
TestURLFunction · 0.85

Calls 2

IsSatisfiedMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected