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

Function EqualExportedValues

require/require.go:223–231  ·  require/require.go::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 } require.EqualExportedValues(t, S{

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

Source from the content-addressed store, hash-verified

221// require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true
222// require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false
223func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
224 if h, ok := t.(tHelper); ok {
225 h.Helper()
226 }
227 if assert.EqualExportedValues(t, expected, actual, msgAndArgs...) {
228 return
229 }
230 t.FailNow()
231}
232
233// EqualExportedValuesf asserts that the types of two objects are equal and their public
234// fields are also equal. This is useful for comparing structs that have private fields

Callers 1

EqualExportedValuesMethod · 0.70

Calls 3

EqualExportedValuesFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected