diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-10 22:10:15 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-10 22:15:20 +0900 |
| commit | 50f6fcb326f81570f12074befa0861a251e9ed5a (patch) | |
| tree | 5ff4f10a7de24257c23967a4eb2fd72f9c51b6c8 /container/stub/stub_test.go | |
| parent | 070e34658766034927ce5deb19369097938c878c (diff) | |
container/stub: mark test overrides as helper
This fixes line information in test reporting messages.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/stub/stub_test.go')
| -rw-r--r-- | container/stub/stub_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/container/stub/stub_test.go b/container/stub/stub_test.go index c3d79a4e..de9971f3 100644 --- a/container/stub/stub_test.go +++ b/container/stub/stub_test.go @@ -43,7 +43,7 @@ func TestStub(t *testing.T) { t.Errorf("recover: %v", r) } }() - new(stubHolder).FailNow() + stubHolder{&Stub[stubHolder]{TB: t}}.FailNow() }) t.Run("SkipNow", func(t *testing.T) { @@ -53,7 +53,7 @@ func TestStub(t *testing.T) { t.Errorf("recover: %v, want %v", r, want) } }() - new(stubHolder).SkipNow() + stubHolder{&Stub[stubHolder]{TB: t}}.SkipNow() }) t.Run("Skip", func(t *testing.T) { @@ -63,7 +63,7 @@ func TestStub(t *testing.T) { t.Errorf("recover: %v, want %v", r, want) } }() - new(stubHolder).Skip() + stubHolder{&Stub[stubHolder]{TB: t}}.Skip() }) t.Run("Skipf", func(t *testing.T) { @@ -73,7 +73,7 @@ func TestStub(t *testing.T) { t.Errorf("recover: %v, want %v", r, want) } }() - new(stubHolder).Skipf("") + stubHolder{&Stub[stubHolder]{TB: t}}.Skipf("") }) }) |
