mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
go/types, types2: remove predecl. test functions from ordinary tests
The type checker implements additional built-in functions (assert and trace) that are useful for debugging. Only permit them in manual tests (go test -run Manual), not for other tests where they are not needed. Change-Id: Idc7723d9e3f6b2c27769b34743561e9d0339565c Reviewed-on: https://go-review.googlesource.com/c/go/+/393659 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
4dc5553930
commit
29866aa2b6
|
@ -297,13 +297,10 @@ func TestManual(t *testing.T) {
|
|||
|
||||
// TODO(gri) go/types has extra TestLongConstants and TestIndexRepresentability tests
|
||||
|
||||
func TestCheck(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "testdata/check", 55, false) } // TODO(gri) narrow column tolerance
|
||||
func TestSpec(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "testdata/spec", 0, false) }
|
||||
func TestExamples(t *testing.T) { testDirFiles(t, "testdata/examples", 0, false) }
|
||||
func TestFixedbugs(t *testing.T) {
|
||||
DefPredeclaredTestFuncs()
|
||||
testDirFiles(t, "testdata/fixedbugs", 0, false)
|
||||
}
|
||||
func TestCheck(t *testing.T) { testDirFiles(t, "testdata/check", 55, false) } // TODO(gri) narrow column tolerance
|
||||
func TestSpec(t *testing.T) { testDirFiles(t, "testdata/spec", 0, false) }
|
||||
func TestExamples(t *testing.T) { testDirFiles(t, "testdata/examples", 0, false) }
|
||||
func TestFixedbugs(t *testing.T) { testDirFiles(t, "testdata/fixedbugs", 0, false) }
|
||||
|
||||
func testDirFiles(t *testing.T, dir string, colDelta uint, manual bool) {
|
||||
testenv.MustHaveGoBuild(t)
|
||||
|
|
|
@ -369,13 +369,10 @@ func TestIssue47243_TypedRHS(t *testing.T) {
|
|||
testFiles(t, &StdSizes{4, 4}, []string{"p.go"}, [][]byte{[]byte(src)}, false, nil)
|
||||
}
|
||||
|
||||
func TestCheck(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "testdata/check", false) }
|
||||
func TestSpec(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "testdata/spec", false) }
|
||||
func TestExamples(t *testing.T) { testDirFiles(t, "testdata/examples", false) }
|
||||
func TestFixedbugs(t *testing.T) {
|
||||
DefPredeclaredTestFuncs()
|
||||
testDirFiles(t, "testdata/fixedbugs", false)
|
||||
}
|
||||
func TestCheck(t *testing.T) { testDirFiles(t, "testdata/check", false) }
|
||||
func TestSpec(t *testing.T) { testDirFiles(t, "testdata/spec", false) }
|
||||
func TestExamples(t *testing.T) { testDirFiles(t, "testdata/examples", false) }
|
||||
func TestFixedbugs(t *testing.T) { testDirFiles(t, "testdata/fixedbugs", false) }
|
||||
|
||||
func testDirFiles(t *testing.T, dir string, manual bool) {
|
||||
testenv.MustHaveGoBuild(t)
|
||||
|
|
Loading…
Reference in a new issue