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 } assert.EqualExportedValuesf(t, S
(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
| 107 | // assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true |
| 108 | // assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false |
| 109 | func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { |
| 110 | if h, ok := t.(tHelper); ok { |
| 111 | h.Helper() |
| 112 | } |
| 113 | return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...) |
| 114 | } |
| 115 | |
| 116 | // EqualValuesf asserts that two objects are equal or convertible to the larger |
| 117 | // type and equal. |
no test coverage detected