aboutsummaryrefslogtreecommitdiff
path: root/test/float_lit3.go
diff options
context:
space:
mode:
authorDan Scales <danscales@google.com>2021-11-27 10:33:59 -0800
committerDan Scales <danscales@google.com>2021-12-03 16:24:32 +0000
commit29483b3dae9bc043887b5372aefe0e53194b9ce7 (patch)
treed9ab4285d5cb8878ea2902fb21f08a9abf9b2ee7 /test/float_lit3.go
parent9b0de0854d5a5655890ef0b2b9052da2541182a3 (diff)
downloadgo-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 'test/float_lit3.go')
-rw-r--r--test/float_lit3.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/float_lit3.go b/test/float_lit3.go
index 850d02c9c7..37a1289fb9 100644
--- a/test/float_lit3.go
+++ b/test/float_lit3.go
@@ -29,19 +29,19 @@ const (
var x = []interface{}{
float32(max32 + ulp32/2 - 1), // ok
float32(max32 + ulp32/2 - two128/two256), // ok
- float32(max32 + ulp32/2), // ERROR "constant 3\.40282e\+38 overflows float32"
+ float32(max32 + ulp32/2), // ERROR "constant 3\.40282e\+38 overflows float32|cannot convert.*to type float32"
float32(-max32 - ulp32/2 + 1), // ok
float32(-max32 - ulp32/2 + two128/two256), // ok
- float32(-max32 - ulp32/2), // ERROR "constant -3\.40282e\+38 overflows float32"
+ float32(-max32 - ulp32/2), // ERROR "constant -3\.40282e\+38 overflows float32|cannot convert.*to type float32"
// If the compiler's internal floating point representation
// is shorter than 1024 bits, it cannot distinguish max64+ulp64/2-1 and max64+ulp64/2.
float64(max64 + ulp64/2 - two1024/two256), // ok
float64(max64 + ulp64/2 - 1), // ok
- float64(max64 + ulp64/2), // ERROR "constant 1\.79769e\+308 overflows float64"
+ float64(max64 + ulp64/2), // ERROR "constant 1\.79769e\+308 overflows float64|cannot convert.*to type float64"
float64(-max64 - ulp64/2 + two1024/two256), // ok
float64(-max64 - ulp64/2 + 1), // ok
- float64(-max64 - ulp64/2), // ERROR "constant -1\.79769e\+308 overflows float64"
+ float64(-max64 - ulp64/2), // ERROR "constant -1\.79769e\+308 overflows float64|cannot convert.*to type float64"
}