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

Method EqualExportedValues

require/require_forward.go:184–189  ·  view source on GitHub ↗

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

182// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true
183// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false
184func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
185 if h, ok := a.t.(tHelper); ok {
186 h.Helper()
187 }
188 EqualExportedValues(a.t, expected, actual, msgAndArgs...)
189}
190
191// EqualExportedValuesf asserts that the types of two objects are equal and their public
192// 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