We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5ef1b2 commit 2443cb5Copy full SHA for 2443cb5
assertion.go
@@ -5,6 +5,9 @@ import (
5
)
6
7
// Assertion is the extension of the Go builtin `testing.T`.
8
+//
9
+// Please do not create an Assertion instance without the New function, every assertion function
10
+// will panic if no inner testing.T set.
11
type Assertion struct {
12
*testing.T
13
}
assertion_test.go
@@ -16,6 +16,14 @@ func TestNewAssertion(t *testing.T) {
16
})
17
18
19
+func TestAssertionWithoutNew(t *testing.T) {
20
+ Panic(t, func() {
21
+ a := new(Assertion)
22
+
23
+ a.True(true)
24
+ })
25
+}
26
27
func TestRun(t *testing.T) {
28
a := New(t)
29
isSubTestRun := false
0 commit comments