MCPcopy Create free account
hub / github.com/stretchr/testify / EqualExportedValuesf

Function EqualExportedValuesf

require/require.go:225–233  ·  view source on GitHub ↗

EqualExportedValuesf 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.EqualExportedValuesf(t,

(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

223// require.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true
224// require.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false
225func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
226 if h, ok := t.(tHelper); ok {
227 h.Helper()
228 }
229 if assert.EqualExportedValuesf(t, expected, actual, msg, args...) {
230 return
231 }
232 t.FailNow()
233}
234
235// EqualValues asserts that two objects are equal or convertible to the larger
236// type and equal.

Callers 1

EqualExportedValuesfMethod · 0.70

Calls 3

EqualExportedValuesfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected