MCPcopy Index your code
hub / github.com/redspread/spread / TestApplyArguments

Function TestApplyArguments

pkg/data/parameter_test.go:113–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestApplyArguments(t *testing.T) {
114 for i, test := range argTests {
115 field := test.In
116 err := ApplyArguments(field, test.Args...)
117 hasErr := err != nil
118 if !hasErr && test.Error {
119 t.Errorf("test %d: should have returned error", i)
120 } else if hasErr && !test.Error {
121 t.Errorf("test %d: shouldn't have errored. Error: %v", i, err)
122 } else if !test.Error && !FieldValueEquals(field, test.Out) {
123 t.Errorf("test %d: field values don't match. expected: '%+v', actual: '%+v'", i, test.Out.GetValue(), test.In.GetValue())
124 }
125 }
126}

Callers

nothing calls this directly

Calls 3

ApplyArgumentsFunction · 0.85
FieldValueEqualsFunction · 0.85
GetValueMethod · 0.45

Tested by

no test coverage detected