diff --git a/go.mod b/go.mod index 50b16a2a..d6176985 100644 --- a/go.mod +++ b/go.mod @@ -31,7 +31,7 @@ require ( github.com/jgautheron/goconst v0.0.0-20201117150253-ccae5bf973f3 github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3 - github.com/kulti/thelper v0.2.0 + github.com/kulti/thelper v0.2.1 github.com/kunwardeep/paralleltest v1.0.2 github.com/kyoh86/exportloopref v0.1.8 github.com/maratori/testpackage v1.0.1 diff --git a/go.sum b/go.sum index 268de103..8c32d722 100644 --- a/go.sum +++ b/go.sum @@ -232,8 +232,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.2.0 h1:0hWMFWREtbyuGTPl/d2c1Kq/VfzNM97NzRwp1zMLaAc= -github.com/kulti/thelper v0.2.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= +github.com/kulti/thelper v0.2.1 h1:H4rSHiB3ALx//SXr+k9OPqKoOw2cAZpIQwVNH1RL5T4= +github.com/kulti/thelper v0.2.1/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= github.com/kunwardeep/paralleltest v1.0.2 h1:/jJRv0TiqPoEy/Y8dQxCFJhD56uS/pnvtatgTZBHokU= github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M= diff --git a/test/testdata/thelper.go b/test/testdata/thelper.go index 43dfadce..677cdb1f 100644 --- a/test/testdata/thelper.go +++ b/test/testdata/thelper.go @@ -28,3 +28,22 @@ func bhelperWithNotFirst(s string, b *testing.B, i int) { // ERROR "parameter \* func bhelperWithIncorrectName(o *testing.B) { // ERROR "parameter \*testing.B should have name b" o.Helper() } + +func TestSubtestShouldNotBeChecked(t *testing.T) { + testCases := []struct { + desc string + }{ + { + desc: "example", + }, + } + + for _, test := range testCases { + test := test + t.Run(test.desc, func(t *testing.T) { + t.Parallel() + + t.Error("test") + }) + } +}