Skip to content

Commit f08212c

Browse files
committed
fix: remove testing.F
1 parent 4a13e50 commit f08212c

File tree

22 files changed

+23
-23
lines changed

22 files changed

+23
-23
lines changed

testdata/src/contextbackground/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
context.Background() // want `context\.Background\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
13+
context.Background() // want `context\.Background\(\) could be replaced by <t/b>\.Context\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/contextbackground/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func Test_NoName(_ *testing.T) {
14-
Background() // want `context\.Background\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
14+
Background() // want `context\.Background\(\) could be replaced by <t/b>\.Context\(\) in .+`
1515
}
1616

1717
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/contextbackground/nottestfiles/nottestfiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func FunctionNoName(_ *testing.T) {
13-
context.Background() // want `context\.Background\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
13+
context.Background() // want `context\.Background\(\) could be replaced by <t/b>\.Context\(\) in .+`
1414
}
1515

1616
func FunctionTB(tb testing.TB) {

testdata/src/contexttodo/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
context.TODO() // want `context\.TODO\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
13+
context.TODO() // want `context\.TODO\(\) could be replaced by <t/b>\.Context\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/contexttodo/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func Test_NoName(_ *testing.T) {
14-
TODO() // want `context\.TODO\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
14+
TODO() // want `context\.TODO\(\) could be replaced by <t/b>\.Context\(\) in .+`
1515
}
1616

1717
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/contexttodo/nottestfiles/nottestfiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func FunctionNoName(_ *testing.T) {
13-
context.TODO() // want `context\.TODO\(\) could be replaced by <t/b/f>\.Context\(\) in .+`
13+
context.TODO() // want `context\.TODO\(\) could be replaced by <t/b>\.Context\(\) in .+`
1414
}
1515

1616
func FunctionTB(tb testing.TB) {

testdata/src/oschdir/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func Test_NoName(_ *testing.T) {
14-
os.Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b/f>\.Chdir\(\) in .+`
14+
os.Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b>\.Chdir\(\) in .+`
1515
}
1616

1717
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/oschdir/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func Test_NoName(_ *testing.T) {
14-
Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b/f>\.Chdir\(\) in .+`
14+
Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b>\.Chdir\(\) in .+`
1515
}
1616

1717
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/oschdir/nottestfiles/nottestfiles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
)
1212

1313
func FunctionNoName(_ *testing.T) {
14-
os.Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b/f>\.Chdir\(\) in .+`
14+
os.Chdir("") // want `os\.Chdir\(\) could be replaced by <t/b>\.Chdir\(\) in .+`
1515
}
1616

1717
func FunctionTB(tb testing.TB) {

testdata/src/oscreatetemp/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func Test_NoName(_ *testing.T) {
11-
os.CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b/f>\.TempDir\(\), \.\.\.\) in .+`
11+
os.CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b>\.TempDir\(\), \.\.\.\) in .+`
1212
}
1313

1414
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/oscreatetemp/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func Test_NoName(_ *testing.T) {
11-
CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b/f>\.TempDir\(\), \.\.\.\) in .+`
11+
CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b>\.TempDir\(\), \.\.\.\) in .+`
1212
}
1313

1414
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/oscreatetemp/nottestfiles/nottestfiles_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
)
99

1010
func FunctionNoName(_ *testing.T) {
11-
os.CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b/f>\.TempDir\(\), \.\.\.\) in .+`
11+
os.CreateTemp("", "") // want `os\.CreateTemp\("", \.\.\.\) could be replaced by os\.CreateTemp\(<t/b>\.TempDir\(\), \.\.\.\) in .+`
1212
}
1313

1414
func FunctionTB(tb testing.TB) {

testdata/src/osmkdirtemp/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
os.MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
os.MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/osmkdirtemp/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/osmkdirtemp/nottestfiles/nottestfiles_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func FunctionNoName(_ *testing.T) {
13-
os.MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
os.MkdirTemp("", "") // want `os\.MkdirTemp\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func FunctionTB(tb testing.TB) {

testdata/src/ossetenv/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
os.Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b/f>\.Setenv\(\) in .+`
13+
os.Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b>\.Setenv\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/ossetenv/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b/f>\.Setenv\(\) in .+`
13+
Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b>\.Setenv\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/ossetenv/nottestfiles/nottestfiles_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func FunctionNoName(_ *testing.T) {
13-
os.Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b/f>\.Setenv\(\) in .+`
13+
os.Setenv("", "") // want `os\.Setenv\(\) could be replaced by <t/b>\.Setenv\(\) in .+`
1414
}
1515

1616
func FunctionTB(tb testing.TB) {

testdata/src/ostempdir/basic/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
os.TempDir() // want `os\.TempDir\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
os.TempDir() // want `os\.TempDir\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/ostempdir/dot/dot_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func Test_NoName(_ *testing.T) {
13-
TempDir() // want `os\.TempDir\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
TempDir() // want `os\.TempDir\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func Benchmark_ExprStmt(b *testing.B) {

testdata/src/ostempdir/nottestfiles/nottestfiles_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func FunctionNoName(_ *testing.T) {
13-
os.TempDir() // want `os\.TempDir\(\) could be replaced by <t/b/f>\.TempDir\(\) in .+`
13+
os.TempDir() // want `os\.TempDir\(\) could be replaced by <t/b>\.TempDir\(\) in .+`
1414
}
1515

1616
func FunctionTB(tb testing.TB) {

usetesting.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ func isTestFunction(arg *ast.Field, pkgName string) (string, bool) {
289289
switch at := arg.Type.(type) {
290290
case *ast.StarExpr:
291291
if se, ok := at.X.(*ast.SelectorExpr); ok {
292-
argName := getTestArgName(arg, "<t/b/f>")
292+
argName := getTestArgName(arg, "<t/b>")
293293

294-
return argName, checkSelectorName(se, pkgName, "T", "B", "F")
294+
return argName, checkSelectorName(se, pkgName, "T", "B")
295295
}
296296

297297
case *ast.SelectorExpr:

0 commit comments

Comments
 (0)