CheckDeepEqual checks that the value is equal to some reference.
(val, ref interface{})
| 157 | |
| 158 | // CheckDeepEqual checks that the value is equal to some reference. |
| 159 | func (t *T) CheckDeepEqual(val, ref interface{}) { |
| 160 | t.Helper() |
| 161 | if !reflect.DeepEqual(val, ref) { |
| 162 | t.failWithf(false, "values not equal\ngot: %# v\nexpected: %# v", |
| 163 | pretty.Formatter(val), pretty.Formatter(ref)) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | // CheckRegexpEqual checks that the value is matched by some regular |
| 168 | // expression. |