Atlas › Test

require

Exact test identity: go.temporal.io/server/common/testing/await/TestT_CollectsAssertionFailures/require

Package
go.temporal.io/server/common/testing/await
Suite / test hierarchy
TestT_CollectsAssertionFailures/require
Test
require
Introduced at
require Frontier kind: Test frontier
Covered ranges
5
Covered lines
15
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/testing/await/t.go 15 covered LOC · 5 ranges

Open complete file

47
48 // Fail marks the current attempt as failed without stopping it.
49 > func (t *T) Fail() { t.go
50 > t.failed = true
51 > }
52
53 // Error records an error message for reporting on timeout.
58
59 // Errorf records an error message for reporting on timeout.
60 > func (t *T) Errorf(format string, args ...any) { t.go
61 > t.Fail()
62 > t.errors = append(t.errors, fmt.Sprintf(format, args...))
63 > }
64
65 // FailNow is called by require.* on failure. It stops the current attempt.
66 // Unlike testing.TB.FailNow(), this does NOT mark the test as failed.
67 > func (t *T) FailNow() { t.go
68 > t.Fail()
69 > panic(attemptFailed{})
70 }
71
83
84 // Failed reports whether this attempt has failed.
85 > func (t *T) Failed() bool { t.go
86 > return t.failed
87 > }
88
89 // Helper marks the calling function as a test helper.
90 > func (t *T) Helper() { t.go
91 > if t.tb != nil {
92 t.tb.Helper()
93 }