Skip to content

Commit

Permalink
cmd/compile/internal/types2: use go/types/testdata/spec tests
Browse files Browse the repository at this point in the history
Since the spec tests are now identical between the two type checkers,
remove the local copy of the spec tests and (for now) use the tests
in go/types/testdata/spec 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: Ibc62230553a5ff215160dcc97696b333ae9cf685
Reviewed-on: https://go-review.googlesource.com/c/go/+/424676
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
  • Loading branch information
griesemer authored and Robert Griesemer committed Aug 18, 2022
1 parent 17211c3 commit 0a4a57d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 595 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 @@ -298,7 +298,7 @@ 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) { testDirFiles(t, "testdata/spec", 0, false) }
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 TestFixedbugs(t *testing.T) { testDirFiles(t, "testdata/fixedbugs", 0, false) }

Expand Down
264 changes: 0 additions & 264 deletions src/cmd/compile/internal/types2/testdata/spec/assignability.go

This file was deleted.

120 changes: 0 additions & 120 deletions src/cmd/compile/internal/types2/testdata/spec/comparisons.go

This file was deleted.

Loading

0 comments on commit 0a4a57d

Please sign in to comment.