MCPcopy Index your code
hub / github.com/foxcpp/maddy / TestMapProcess_MissingRequired

Function TestMapProcess_MissingRequired

framework/config/map_test.go:52–68  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

50}
51
52func TestMapProcess_MissingRequired(t *testing.T) {
53 cfg := Node{
54 Children: []Node{},
55 }
56
57 m := NewMap(nil, cfg)
58
59 foo := ""
60 m.Custom("foo", false, true, nil, func(_ *Map, n Node) (interface{}, error) {
61 return n.Args[0], nil
62 }, &foo)
63
64 _, err := m.Process()
65 if err == nil {
66 t.Errorf("Expected failure")
67 }
68}
69
70func TestMapProcess_InheritGlobal(t *testing.T) {
71 cfg := Node{

Callers

nothing calls this directly

Calls 3

CustomMethod · 0.95
ProcessMethod · 0.95
NewMapFunction · 0.85

Tested by

no test coverage detected