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{})
| 221 | // require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true |
| 222 | // require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false |
| 223 | func 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 |
no test coverage detected