Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

surface panic when calling Finish is implicit #478

Merged
merged 3 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test name
  • Loading branch information
codyoss committed Sep 1, 2020
commit d0178670e1acc5765f153e9c8335ef881b9662f8
4 changes: 2 additions & 2 deletions ci/check_panic_handling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
set -eux

pushd mockgen/internal/tests/panicing_test
go test -v -tags=panictest -run TestSomething_Panics_Explicit | grep "Danger, Will Robinson!"
go test -v -tags=panictest -run TestSomething_Panics_Implicit | grep "Danger, Will Robinson!"
go test -v -tags=panictest -run TestDanger_Panics_Explicit | grep "Danger, Will Robinson!"
go test -v -tags=panictest -run TestDanger_Panics_Implicit | grep "Danger, Will Robinson!"
popd
4 changes: 2 additions & 2 deletions mockgen/internal/tests/panicing_test/panic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/golang/mock/gomock"
)

func TestSomething_Panics_Explicit(t *testing.T) {
func TestDanger_Panics_Explicit(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mock := NewMockFoo(ctrl)
Expand All @@ -31,7 +31,7 @@ func TestSomething_Panics_Explicit(t *testing.T) {
Danger(mock)
}

func TestSomething_Panics_Implicit(t *testing.T) {
func TestDanger_Panics_Implicit(t *testing.T) {
ctrl := gomock.NewController(t)
mock := NewMockFoo(ctrl)
mock.EXPECT().Bar().Return("Bar")
Expand Down