2022-07-15 15:32:10 +02:00
|
|
|
//golangcitest:args -Ethelper
|
2022-04-07 08:11:09 +03:00
|
|
|
package testdata
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2022-08-20 18:53:45 +02:00
|
|
|
func fhelperWithHelperAfterAssignment(f *testing.F) { // want "test helper function should start from f.Helper()"
|
2022-04-07 08:11:09 +03:00
|
|
|
_ = 0
|
|
|
|
f.Helper()
|
|
|
|
}
|
|
|
|
|
2022-08-20 18:53:45 +02:00
|
|
|
func fhelperWithNotFirst(s string, f *testing.F, i int) { // want `parameter \*testing.F should be the first`
|
2022-04-07 08:11:09 +03:00
|
|
|
f.Helper()
|
|
|
|
}
|
|
|
|
|
2022-08-20 18:53:45 +02:00
|
|
|
func fhelperWithIncorrectName(o *testing.F) { // want `parameter \*testing.F should have name f`
|
2022-04-07 08:11:09 +03:00
|
|
|
o.Helper()
|
|
|
|
}
|
|
|
|
|
|
|
|
func FuzzSubtestShouldNotBeChecked(f *testing.F) {
|
|
|
|
f.Add(5, "hello")
|
|
|
|
f.Fuzz(func(t *testing.T, a int, b string) {})
|
|
|
|
}
|