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

Method EqualExportedValues

assert/assertion_forward.go:183–188  ·  assert/assertion_forward.go::Assertions.EqualExportedValues

EqualExportedValues 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.EqualExportedValues(S{1, 2}, S{

(expected interface{}, actual interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

181// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true
182// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false
183func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
184 if h, ok := a.t.(tHelper); ok {
185 h.Helper()
186 }
187 return EqualExportedValues(a.t, expected, actual, msgAndArgs...)
188}
189
190// EqualExportedValuesf asserts that the types of two objects are equal and their public
191// fields are also equal. This is useful for comparing structs that have private fields

Callers

nothing calls this directly

Calls 2

EqualExportedValuesFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected