MCPcopy
hub / github.com/stretchr/testify / EqualExportedValuesf

Method EqualExportedValuesf

require/require_forward.go:201–206  ·  view source on GitHub ↗

EqualExportedValuesf asserts that the types of two objects are equal and their public fields are also equal. This is useful for comparing structs that have private fields that could potentially differ. type S struct { Exported int notExported int } a.EqualExportedValuesf(S{1, 2},

(expected interface{}, actual interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

199// a.EqualExportedValuesf(S{1, 2}, S{1, 3}, "error message %s", "formatted") => true
200// a.EqualExportedValuesf(S{1, 2}, S{2, 3}, "error message %s", "formatted") => false
201func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
202 if h, ok := a.t.(tHelper); ok {
203 h.Helper()
204 }
205 EqualExportedValuesf(a.t, expected, actual, msg, args...)
206}
207
208// EqualValues asserts that two objects are equal or convertible to the larger
209// type and equal.

Callers

nothing calls this directly

Calls 2

EqualExportedValuesfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected