Skip to content

Commit

Permalink
cmd/compile/internal/types2: use go/types/testdata/check tests
Browse files Browse the repository at this point in the history
Since the check tests are now identical between the two type checkers,
remove the local copy of the check tests and (for now) use the tests
in go/types/testdata/check instead. Eventually we may decide to move
all tests out of the type checker directories and place them in a
shared space (e.g. internal/types/testdata).

For #54511.

Change-Id: Id3a97593f6c705c5eda4566089ddc7aeb7b47337
Reviewed-on: https://go-review.googlesource.com/c/go/+/425736
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
  • Loading branch information
griesemer authored and Robert Griesemer committed Sep 1, 2022
1 parent bbaf0a5 commit 330282a
Show file tree
Hide file tree
Showing 66 changed files with 5 additions and 11,309 deletions.
7 changes: 5 additions & 2 deletions src/cmd/compile/internal/types2/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,12 @@ 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 TestCheck(t *testing.T) {
DefPredeclaredTestFuncs()
testDirFiles(t, "../../../../go/types/testdata/check", 55, false) // TODO(gri) narrow column tolerance
}
func TestSpec(t *testing.T) { testDirFiles(t, "../../../../go/types/testdata/spec", 0, false) }
func TestExamples(t *testing.T) { testDirFiles(t, "../../../../go/types/testdata/examples", 45, false) }
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, "testdata/fixedbugs", 0, false) }

func testDirFiles(t *testing.T, dir string, colDelta uint, manual bool) {
Expand Down
5 changes: 0 additions & 5 deletions src/cmd/compile/internal/types2/testdata/check/blank.go

This file was deleted.

Loading

0 comments on commit 330282a

Please sign in to comment.