MCPcopy
hub / github.com/expr-lang/expr / EqualExportedValues

Method EqualExportedValues

internal/testify/assert/assertion_forward.go:165–170  ·  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

163// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true
164// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false
165func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
166 if h, ok := a.t.(tHelper); ok {
167 h.Helper()
168 }
169 return EqualExportedValues(a.t, expected, actual, msgAndArgs...)
170}
171
172// EqualExportedValuesf asserts that the types of two objects are equal and their public
173// 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.45

Tested by

no test coverage detected