MCPcopy
hub / github.com/gofiber/fiber / Test_ConstraintAnalyze_MissingArgs

Function Test_ConstraintAnalyze_MissingArgs

constraint_test.go:43–66  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

41}
42
43func Test_ConstraintAnalyze_MissingArgs(t *testing.T) {
44 t.Parallel()
45
46 testCases := []struct {
47 handler ConstraintAnalyzer
48 name string
49 }{
50 {datetimeConstraintType{}, "datetime"},
51 {minLenConstraintType{}, "minLen"},
52 {maxLenConstraintType{}, "maxLen"},
53 {lenConstraintType{}, "len"},
54 {minConstraintType{}, "min"},
55 {maxConstraintType{}, "max"},
56 {regexConstraintType{}, "regex"},
57 }
58
59 for _, tc := range testCases {
60 t.Run(tc.name, func(t *testing.T) {
61 t.Parallel()
62 _, err := tc.handler.Analyze([]string{})
63 require.Error(t, err)
64 })
65 }
66}
67
68func Test_ConstraintAnalyze_BetweenLen(t *testing.T) {
69 t.Parallel()

Callers

nothing calls this directly

Calls 2

AnalyzeMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…