AssertfCtx logs an error message and continues execution, or when compiled with the `cb_sg_devmode` build tag panics for better dev-time visibility. The SG test harness will ensure AssertionFailCount is zero at the end of tests, even without devmode enabled. Note: Callers MUST ensure code is safe to
(ctx context.Context, format string, args ...any)
| 25 | // The SG test harness will ensure AssertionFailCount is zero at the end of tests, even without devmode enabled. |
| 26 | // Note: Callers MUST ensure code is safe to continue executing after the Assert (e.g. by returning an error) and MUST NOT be used like a panic that will halt. |
| 27 | func AssertfCtx(ctx context.Context, format string, args ...any) { |
| 28 | SyncGatewayStats.GlobalStats.ResourceUtilization.AssertionFailCount.Add(1) |
| 29 | assertLogFn(ctx, AssertionFailedPrefix+format, args...) |
| 30 | } |
no test coverage detected