MCPcopy Index your code
hub / github.com/cockroachdb/errors / AssertEqual

Method AssertEqual

testutils/simplecheck.go:95–101  ·  view source on GitHub ↗

AssertEqual asserts that the value is equal to some reference.

(val, ref interface{})

Source from the content-addressed store, hash-verified

93
94// AssertEqual asserts that the value is equal to some reference.
95func (t *T) AssertEqual(val, ref interface{}) {
96 t.Helper()
97 if val != ref {
98 t.failWithf(true, "assertion failed: values not equal\ngot: %# v\nexpected: %# v",
99 pretty.Formatter(val), pretty.Formatter(ref))
100 }
101}
102
103// AssertDeepEqual asserts that the value is equal to some reference.
104func (t *T) AssertDeepEqual(val, ref interface{}) {

Callers 1

TestAssertFunction · 0.80

Calls 1

failWithfMethod · 0.95

Tested by 1

TestAssertFunction · 0.64