diff options
| author | Robert Griesemer <gri@golang.org> | 2021-04-05 19:10:22 -0700 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2021-04-10 19:02:03 +0000 |
| commit | 4638545d85d7e10e49132ee94ff9a6778db1c893 (patch) | |
| tree | 2d62f3b4aa751124ca5c6fa2ed0a3516159d04a7 /src/cmd/compile/internal/syntax/error_test.go | |
| parent | 1129a60f1c1e64147ca1133857c4571ce9b87a35 (diff) | |
| download | go-4638545d85d7e10e49132ee94ff9a6778db1c893.tar.xz | |
cmd/compile/internal/syntax: accept "~" and "|" interface elements
Type lists continue to be accepted as before.
While at it, print missing filenames in error tests
(which uses an ad-hoc position representation).
Change-Id: I933b3acbc9cf1985ad8f70f6b206e3a1dbd64d1e
Reviewed-on: https://go-review.googlesource.com/c/go/+/307371
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/syntax/error_test.go')
| -rw-r--r-- | src/cmd/compile/internal/syntax/error_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/syntax/error_test.go b/src/cmd/compile/internal/syntax/error_test.go index 919667f1d3..e4bedf54fd 100644 --- a/src/cmd/compile/internal/syntax/error_test.go +++ b/src/cmd/compile/internal/syntax/error_test.go @@ -164,7 +164,7 @@ func testSyntaxErrors(t *testing.T, filename string) { // we have a match - eliminate this error delete(declared, pos) } else { - t.Errorf("%s: unexpected error: %s", orig, e.Msg) + t.Errorf("%s:%s: unexpected error: %s", filename, orig, e.Msg) } }, nil, mode) @@ -175,7 +175,7 @@ func testSyntaxErrors(t *testing.T, filename string) { // report expected but not reported errors for pos, pattern := range declared { - t.Errorf("%s: missing error: %s", pos, pattern) + t.Errorf("%s:%s: missing error: %s", filename, pos, pattern) } } |
