1
0
mirror of https://github.com/golang/go synced 2024-11-16 20:14:48 -07:00

go/types, types2: establish type-checker specific local tests

Establish testdata/local directory for tests that are not (yet)
shared between the go/types and types2. Move issue47996.go into
that directory.

For #54511.

Change-Id: I274b119990a93cc3657bdddc5246948699226c21
Reviewed-on: https://go-review.googlesource.com/c/go/+/426660
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
This commit is contained in:
Robert Griesemer 2022-08-31 17:29:28 -07:00 committed by Gopher Robot
parent 29e360274a
commit 157aae6eed
4 changed files with 12 additions and 1 deletions

View File

@ -305,7 +305,8 @@ func TestSpec(t *testing.T) { testDirFiles(t, "../../../../go/types/testdata
func TestExamples(t *testing.T) { testDirFiles(t, "../../../../go/types/testdata/examples", 45, false) } // TODO(gri) narrow column tolerance
func TestFixedbugs(t *testing.T) {
testDirFiles(t, "../../../../go/types/testdata/fixedbugs", 100, false)
} // TODO(gri) narrow column tolerance
} // TODO(gri) narrow column tolerance
func TestLocal(t *testing.T) { testDirFiles(t, "testdata/local", 0, false) }
func testDirFiles(t *testing.T, dir string, colDelta uint, manual bool) {
testenv.MustHaveGoBuild(t)

View File

@ -362,6 +362,7 @@ func TestCheck(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "t
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 TestLocal(t *testing.T) { testDirFiles(t, "testdata/local", false) }
func testDirFiles(t *testing.T, dir string, manual bool) {
testenv.MustHaveGoBuild(t)

View File

@ -0,0 +1,9 @@
// Copyright 2021 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.
package p
// don't crash
// TODO(gri) make this test work for go/types
// func T[P] m() {}