Skip to content

Commit c2eec00

Browse files
committed
documentation of using isErrorOnly
1 parent 5a5806e commit c2eec00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

assert/asserter.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ const officialTestOutputPrefix = " "
5454
// Note. We use the pattern where we build defaultMsg argument reaady in cases
5555
// like 'got: X, want: Y'. This hits two birds with one stone: we have automatic
5656
// and correct assert messages, and we can add information to it if we want to.
57+
// If asserter is Plain (isErrorOnly()) user wants to override automatic assert
58+
// messgages with our given, usually simple message.
5759
func (asserter Asserter) reportAssertionFault(defaultMsg string, a []any) {
5860
if asserter.hasStackTrace() {
5961
if asserter.isUnitTesting() {

0 commit comments

Comments
 (0)