-// UNREVIEWED
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
"fmt"
"go/build"
"internal/testenv"
- "io/ioutil"
"os"
"path/filepath"
"runtime"
}
func testTestDir(t *testing.T, path string, ignore ...string) {
- files, err := ioutil.ReadDir(path)
+ files, err := os.ReadDir(path)
if err != nil {
t.Fatal(err)
}
"bug248.go", "bug302.go", "bug369.go", // complex test instructions - ignore
"issue6889.go", // gc-specific test
"issue11362.go", // canonical import path check
- "issue16369.go", // go/types handles this correctly - not an issue
- "issue18459.go", // go/types doesn't check validity of //go:xxx directives
- "issue18882.go", // go/types doesn't check validity of //go:xxx directives
- "issue20529.go", // go/types does not have constraints on stack size
- "issue22200.go", // go/types does not have constraints on stack size
- "issue22200b.go", // go/types does not have constraints on stack size
- "issue25507.go", // go/types does not have constraints on stack size
- "issue20780.go", // go/types does not have constraints on stack size
- "issue42058a.go", // go/types does not have constraints on channel element size
- "issue42058b.go", // go/types does not have constraints on channel element size
- "bug251.go", // issue #34333 which was exposed with fix for #34151
+ "issue16369.go", // types2 handles this correctly - not an issue
+ "issue18459.go", // types2 doesn't check validity of //go:xxx directives
+ "issue18882.go", // types2 doesn't check validity of //go:xxx directives
+ "issue20529.go", // types2 does not have constraints on stack size
+ "issue22200.go", // types2 does not have constraints on stack size
+ "issue22200b.go", // types2 does not have constraints on stack size
+ "issue25507.go", // types2 does not have constraints on stack size
+ "issue20780.go", // types2 does not have constraints on stack size
+ "issue42058a.go", // types2 does not have constraints on channel element size
+ "issue42058b.go", // types2 does not have constraints on channel element size
)
}
return
}
- fis, err := ioutil.ReadDir(dir)
+ files, err := os.ReadDir(dir)
if err != nil {
w.errh(err)
return
}
// traverse subdirectories, but don't walk into testdata
- for _, fi := range fis {
- if fi.IsDir() && fi.Name() != "testdata" {
- w.walk(filepath.Join(dir, fi.Name()))
+ for _, f := range files {
+ if f.IsDir() && f.Name() != "testdata" {
+ w.walk(filepath.Join(dir, f.Name()))
}
}
}