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

Method Assert

testutils/simplecheck.go:87–92  ·  view source on GitHub ↗

Assert calls t.Fatal if the condition is false. Also the text of the assertion is printed.

(cond bool)

Source from the content-addressed store, hash-verified

85// Assert calls t.Fatal if the condition is false. Also
86// the text of the assertion is printed.
87func (t *T) Assert(cond bool) {
88 t.Helper()
89 if !cond {
90 t.failWithf(true, "assertion failed")
91 }
92}
93
94// AssertEqual asserts that the value is equal to some reference.
95func (t *T) AssertEqual(val, ref interface{}) {

Callers 14

TestGrpcFunction · 0.95
TestHideCauseFunction · 0.95
TestBarrierMaskedDetailsFunction · 0.95
TestHandledFunction · 0.95
TestGrpcFunction · 0.95
TestHideSecondaryErrorFunction · 0.95
checkStackTraceFunction · 0.95
TestIssueLinkHintFunction · 0.95
TestUnimplementedHintFunction · 0.95
TestAssertionHintsFunction · 0.95

Calls 1

failWithfMethod · 0.95

Tested by 14

TestGrpcFunction · 0.76
TestHideCauseFunction · 0.76
TestBarrierMaskedDetailsFunction · 0.76
TestHandledFunction · 0.76
TestGrpcFunction · 0.76
TestHideSecondaryErrorFunction · 0.76
checkStackTraceFunction · 0.76
TestIssueLinkHintFunction · 0.76
TestUnimplementedHintFunction · 0.76
TestAssertionHintsFunction · 0.76