diff options
author | Dan Scales <danscales@google.com> | 2021-11-27 10:33:59 -0800 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-12-03 16:24:32 +0000 |
commit | 29483b3dae9bc043887b5372aefe0e53194b9ce7 (patch) | |
tree | d9ab4285d5cb8878ea2902fb21f08a9abf9b2ee7 /src/go | |
parent | 9b0de0854d5a5655890ef0b2b9052da2541182a3 (diff) | |
download | go-29483b3dae9bc043887b5372aefe0e53194b9ce7.tar.gz go-29483b3dae9bc043887b5372aefe0e53194b9ce7.zip |
test: re-enable a bunch of tests with types2
Enable a bunch of types2-related error tests to run successfully, so
they no longer have to be disabled in run.go.
- directive.go: split it into directive.go and directive2.go, since the
possible errors are now split across the parser and noder2, so they
can't all be reported in one file.
- linkname2.go: similarly, split it into linkname2.go and linkname3.go
for the same reason.
- issue16428.go, issue17645.go, issue47201.dir/bo.go: handle slightly
different wording by types2
- issue5609.go: handle slight different error (array length must be
integer vs. array bound too large).
- float_lit3.go: handle slightly different wording (overflows
float vs cannot convert to float)
I purposely didn't try to fix tests yet where there are extra or missing
errors on different lines, since that is not easy to make work for both
-G=3 and -G=0. In a later change, will flip to make the types2 version
match correctly, vs. the -G=0 version.
Change-Id: I6079ff258e3b90146335b9995764e3b1b56cda59
Reviewed-on: https://go-review.googlesource.com/c/go/+/368455
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/go')
-rw-r--r-- | src/go/types/stdlib_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/go/types/stdlib_test.go b/src/go/types/stdlib_test.go index c56e0ba428..687b80540a 100644 --- a/src/go/types/stdlib_test.go +++ b/src/go/types/stdlib_test.go @@ -166,9 +166,11 @@ func TestStdTest(t *testing.T) { testTestDir(t, filepath.Join(runtime.GOROOT(), "test"), "cmplxdivide.go", // also needs file cmplxdivide1.go - ignore "directive.go", // tests compiler rejection of bad directive placement - ignore + "directive2.go", // tests compiler rejection of bad directive placement - ignore "embedfunc.go", // tests //go:embed "embedvers.go", // tests //go:embed "linkname2.go", // go/types doesn't check validity of //go:xxx directives + "linkname3.go", // go/types doesn't check validity of //go:xxx directives ) } |