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

Method CheckEqual

testutils/simplecheck.go:122–128  ·  view source on GitHub ↗

CheckEqual checks that the value is equal to some reference.

(val, ref interface{})

Source from the content-addressed store, hash-verified

120
121// CheckEqual checks that the value is equal to some reference.
122func (t *T) CheckEqual(val, ref interface{}) {
123 t.Helper()
124 if val != ref {
125 t.failWithf(false, "values not equal\n got: %# v\nexpected: %# v",
126 pretty.Formatter(val), pretty.Formatter(ref))
127 }
128}
129
130func (t *T) CheckContains(s, substr string) {
131 t.Helper()

Callers 15

TestWithContextFunction · 0.95
TestBarrierMessageFunction · 0.95
TestNoDomainFunction · 0.95
TestNamedDomainFunction · 0.95
TestPackageDomainFunction · 0.95
TestWithDomainFunction · 0.95
TestHandledInDomainFunction · 0.95
TestGrpcFunction · 0.95
TestUnwrapFunction · 0.95
TestMixedErrorWrappingFunction · 0.95
TestMultiErrorUnwrapFunction · 0.95
TestTypeNameFunction · 0.95

Calls 1

failWithfMethod · 0.95

Tested by 15

TestWithContextFunction · 0.76
TestBarrierMessageFunction · 0.76
TestNoDomainFunction · 0.76
TestNamedDomainFunction · 0.76
TestPackageDomainFunction · 0.76
TestWithDomainFunction · 0.76
TestHandledInDomainFunction · 0.76
TestGrpcFunction · 0.76
TestUnwrapFunction · 0.76
TestMixedErrorWrappingFunction · 0.76
TestMultiErrorUnwrapFunction · 0.76
TestTypeNameFunction · 0.76