MCPcopy Index your code
hub / github.com/expr-lang/expr / EqualExportedValues

Function EqualExportedValues

internal/testify/require/require.go:206–214  ·  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 } assert.EqualExportedValues(t, S{1

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

Source from the content-addressed store, hash-verified

204// assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true
205// assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false
206func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
207 if h, ok := t.(tHelper); ok {
208 h.Helper()
209 }
210 if assert.EqualExportedValues(t, expected, actual, msgAndArgs...) {
211 return
212 }
213 t.FailNow()
214}
215
216// EqualExportedValuesf asserts that the types of two objects are equal and their public
217// fields are also equal. This is useful for comparing structs that have private fields

Callers 1

EqualExportedValuesMethod · 0.70

Calls 3

EqualExportedValuesFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…