AssertDeepEqual asserts that the value is equal to some reference.
(val, ref interface{})
| 102 | |
| 103 | // AssertDeepEqual asserts that the value is equal to some reference. |
| 104 | func (t *T) AssertDeepEqual(val, ref interface{}) { |
| 105 | t.Helper() |
| 106 | if !reflect.DeepEqual(val, ref) { |
| 107 | t.failWithf(true, "assertion failed: values not equal\ngot: %# v\nexpected: %# v", |
| 108 | pretty.Formatter(val), pretty.Formatter(ref)) |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | // Check calls t.Error if the condition is false. Also |
| 113 | // the text of the condition is printed. |