[dev.typeparams] go/types: add tests from dev.go2go
Add tests from the dev.go2go branch, modified to eliminate support for parenthesized type embedding and method type parameters. For the most part these tests were made to pass via the fixes from preceding CLs in this stack. While integrating support for type parameters with the changes to go/types in master, a decision was made to temporarily use an error code of 0 for new error messages. Now that these messages are actually emitted during checking of test packages, it is a test failure for them to have an error code of 0. To satisfy the test, create a new temporary error code '_Todo', which represents an error code that has not yet been assigned. _Todo is added only where it was necessary to make tests pass: many error codes were left as 0, meaning we don't have any tests that produce them. This marker may help us produce more comprehensive tests in the future. Finally, each package checked by testDir was made into a subtest, for the ease of running individual packages while debugging test failures. This seemed worth keeping. Change-Id: Iba421b797e9fb11af664a73902f67d6c4f30ecad Reviewed-on: https://go-review.googlesource.com/c/go/+/283854 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:Robert Griesemer <gri@golang.org> Trust: Robert Griesemer <gri@golang.org> Trust: Robert Findley <rfindley@google.com>
Loading
Please sign in to comment