golangci-lint/test/testdata/thelper_go118.go
2022-08-24 22:10:51 +02:00

25 lines
578 B
Go

//go:build go1.18
//golangcitest:args -Ethelper
package testdata
import "testing"
func fhelperWithHelperAfterAssignment(f *testing.F) { // want "test helper function should start from f.Helper()"
_ = 0
f.Helper()
}
func fhelperWithNotFirst(s string, f *testing.F, i int) { // want `parameter \*testing.F should be the first`
f.Helper()
}
func fhelperWithIncorrectName(o *testing.F) { // want `parameter \*testing.F should have name f`
o.Helper()
}
func FuzzSubtestShouldNotBeChecked(f *testing.F) {
f.Add(5, "hello")
f.Fuzz(func(t *testing.T, a int, b string) {})
}