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

Function TestMapProcess_InheritGlobal_MissingRequired

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

Source from the content-addressed store, hash-verified

90}
91
92func TestMapProcess_InheritGlobal_MissingRequired(t *testing.T) {
93 cfg := Node{
94 Children: []Node{},
95 }
96
97 m := NewMap(map[string]interface{}{}, cfg)
98
99 foo := ""
100 m.Custom("foo", false, true, nil, func(_ *Map, n Node) (interface{}, error) {
101 return n.Args[0], nil
102 }, &foo)
103
104 _, err := m.Process()
105 if err == nil {
106 t.Errorf("Expected failure")
107 }
108}
109
110func TestMapProcess_InheritGlobal_Override(t *testing.T) {
111 cfg := Node{

Callers

nothing calls this directly

Calls 3

CustomMethod · 0.95
ProcessMethod · 0.95
NewMapFunction · 0.85

Tested by

no test coverage detected