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

Method EqualExportedValuesf

assert/assertion_forward.go:200–205  ·  assert/assertion_forward.go::Assertions.EqualExportedValuesf

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

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

Callers

nothing calls this directly

Calls 2

EqualExportedValuesfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected