Skip to content

Commit

Permalink
cmd/compile/internal/types2: use go/types/testdata/examples tests
Browse files Browse the repository at this point in the history
Since the examples tests are now identical between the two type checkers,
remove the local copy of the examples tests and (for now) use the tests
in go/types/testdata/examples 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: Ibd8599d09e781b2219a23114b4b2049757971181
Reviewed-on: https://go-review.googlesource.com/c/go/+/424695
Reviewed-by: Robert Findley <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
Run-TryBot: Robert Griesemer <[email protected]>
  • Loading branch information
griesemer committed Aug 19, 2022
1 parent 5a53807 commit 8892a51
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 931 deletions.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/types2/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ func TestManual(t *testing.T) {

func TestCheck(t *testing.T) { DefPredeclaredTestFuncs(); testDirFiles(t, "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, "testdata/examples", 45, false) }
func TestExamples(t *testing.T) { testDirFiles(t, "../../../../go/types/testdata/examples", 45, false) }
func TestFixedbugs(t *testing.T) { testDirFiles(t, "testdata/fixedbugs", 0, false) }

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

This file was deleted.

219 changes: 0 additions & 219 deletions src/cmd/compile/internal/types2/testdata/examples/functions.go

This file was deleted.

Loading

0 comments on commit 8892a51

Please sign in to comment.