diff options
author | Zachary Burkett <zburkett@splitcubestudios.com> | 2021-05-29 19:54:10 +0000 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-06-02 05:14:45 +0000 |
commit | d2b435117d3a1db612ad894125b8ab673a5a46ee (patch) | |
tree | ef64315d120a6016a92d84ee70dbf32c90bd94ba /test/ddd1.go | |
parent | b1f48e8addb640b6cbfad56d790b7702ff9fd30d (diff) | |
download | go-d2b435117d3a1db612ad894125b8ab673a5a46ee.tar.gz go-d2b435117d3a1db612ad894125b8ab673a5a46ee.zip |
test: fix error check messages for 2 types2 tests
Many compiler tests fail with -G=3 due to changes in error message format.
This commit fixes two of these tests, to ensure I am on the right track in review.
Updates #46447
Change-Id: I138956d536a1d48ca9198e6ddbfde13865bb5dd5
GitHub-Last-Rev: 0ed904b9fad5e6739fee02ab48c7bc66508d736b
GitHub-Pull-Request: golang/go#46445
Reviewed-on: https://go-review.googlesource.com/c/go/+/323314
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'test/ddd1.go')
-rw-r--r-- | test/ddd1.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ddd1.go b/test/ddd1.go index ad49b347f4..f7381b7c94 100644 --- a/test/ddd1.go +++ b/test/ddd1.go @@ -17,8 +17,8 @@ var ( _ = sum(1, 2, 3) _ = sum() _ = sum(1.0, 2.0) - _ = sum(1.5) // ERROR "integer" - _ = sum("hello") // ERROR ".hello. .type untyped string. as type int|incompatible" + _ = sum(1.5) // ERROR "1\.5 .untyped float constant. as int|integer" + _ = sum("hello") // ERROR ".hello. (.untyped string constant. as int|.type untyped string. as type int)|incompatible" _ = sum([]int{1}) // ERROR "\[\]int{...}.*as type int|incompatible" ) @@ -27,9 +27,9 @@ func tuple() (int, int, int) { return 1, 2, 3 } var ( _ = sum(tuple()) - _ = sum(tuple()...) // ERROR "multiple-value" + _ = sum(tuple()...) // ERROR "\.{3} with 3-valued|multiple-value" _ = sum3(tuple()) - _ = sum3(tuple()...) // ERROR "multiple-value" ERROR "invalid use of .*[.][.][.]" + _ = sum3(tuple()...) // ERROR "\.{3} in call to non-variadic|multiple-value|invalid use of .*[.][.][.]" ) type T []T @@ -60,5 +60,5 @@ func bad(args ...int) { _ = [...]byte("foo") // ERROR "[.][.][.]" _ = [...][...]int{{1,2,3},{4,5,6}} // ERROR "[.][.][.]" - Foo(x...) // ERROR "invalid use of .*[.][.][.]" + Foo(x...) // ERROR "\.{3} in call to non-variadic|invalid use of .*[.][.][.]" } |