/usr/share/go-1.7/test/fixedbugs/issue13559.go is in golang-1.7-src 1.7.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | // errorcheck
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Verify that error messages print meaningful values
// for various extreme floating-point constants.
package p
// failure case in issue
const _ int64 = 1e-10000 // ERROR "1e\-10000 truncated"
const (
_ int64 = 1e10000000 // ERROR "1e\+10000000 overflows"
_ int64 = 1e1000000 // ERROR "1e\+1000000 overflows"
_ int64 = 1e100000 // ERROR "1e\+100000 overflows"
_ int64 = 1e10000 // ERROR "1e\+10000 overflows"
_ int64 = 1e1000 // ERROR "1e\+1000 overflows"
_ int64 = 1e100 // ERROR "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 overflows"
_ int64 = 1e10
_ int64 = 1e1
_ int64 = 1e0
_ int64 = 1e-1 // ERROR "0\.1 truncated"
_ int64 = 1e-10 // ERROR "1e\-10 truncated"
_ int64 = 1e-100 // ERROR "1e\-100 truncated"
_ int64 = 1e-1000 // ERROR "1e\-1000 truncated"
_ int64 = 1e-10000 // ERROR "1e\-10000 truncated"
_ int64 = 1e-100000 // ERROR "1e\-100000 truncated"
_ int64 = 1e-1000000 // ERROR "1e\-1000000 truncated"
)
const (
_ int64 = -1e10000000 // ERROR "\-1e\+10000000 overflows"
_ int64 = -1e1000000 // ERROR "\-1e\+1000000 overflows"
_ int64 = -1e100000 // ERROR "\-1e\+100000 overflows"
_ int64 = -1e10000 // ERROR "\-1e\+10000 overflows"
_ int64 = -1e1000 // ERROR "\-1e\+1000 overflows"
_ int64 = -1e100 // ERROR "\-10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 overflows"
_ int64 = -1e10
_ int64 = -1e1
_ int64 = -1e0
_ int64 = -1e-1 // ERROR "\-0\.1 truncated"
_ int64 = -1e-10 // ERROR "\-1e\-10 truncated"
_ int64 = -1e-100 // ERROR "\-1e\-100 truncated"
_ int64 = -1e-1000 // ERROR "\-1e\-1000 truncated"
_ int64 = -1e-10000 // ERROR "\-1e\-10000 truncated"
_ int64 = -1e-100000 // ERROR "\-1e\-100000 truncated"
_ int64 = -1e-1000000 // ERROR "\-1e\-1000000 truncated"
)
const (
_ int64 = 1.23456789e10000000 // ERROR "1\.23457e\+10000000 overflows"
_ int64 = 1.23456789e1000000 // ERROR "1\.23457e\+1000000 overflows"
_ int64 = 1.23456789e100000 // ERROR "1\.23457e\+100000 overflows"
_ int64 = 1.23456789e10000 // ERROR "1\.23457e\+10000 overflows"
_ int64 = 1.23456789e1000 // ERROR "1\.23457e\+1000 overflows"
_ int64 = 1.23456789e100 // ERROR "12345678900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 overflows"
_ int64 = 1.23456789e10
_ int64 = 1.23456789e1 // ERROR "12\.3457 truncated"
_ int64 = 1.23456789e0 // ERROR "1\.23457 truncated"
_ int64 = 1.23456789e-1 // ERROR "0\.123457 truncated"
_ int64 = 1.23456789e-10 // ERROR "1\.23457e\-10 truncated"
_ int64 = 1.23456789e-100 // ERROR "1\.23457e\-100 truncated"
_ int64 = 1.23456789e-1000 // ERROR "1\.23457e\-1000 truncated"
_ int64 = 1.23456789e-10000 // ERROR "1\.23457e\-10000 truncated"
_ int64 = 1.23456789e-100000 // ERROR "1\.23457e\-100000 truncated"
_ int64 = 1.23456789e-1000000 // ERROR "1\.23457e\-1000000 truncated"
)
const (
_ int64 = -1.23456789e10000000 // ERROR "\-1\.23457e\+10000000 overflows"
_ int64 = -1.23456789e1000000 // ERROR "\-1\.23457e\+1000000 overflows"
_ int64 = -1.23456789e100000 // ERROR "\-1\.23457e\+100000 overflows"
_ int64 = -1.23456789e10000 // ERROR "\-1\.23457e\+10000 overflows"
_ int64 = -1.23456789e1000 // ERROR "\-1\.23457e\+1000 overflows"
_ int64 = -1.23456789e100 // ERROR "\-12345678900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 overflows"
_ int64 = -1.23456789e10
_ int64 = -1.23456789e1 // ERROR "\-12\.3457 truncated"
_ int64 = -1.23456789e0 // ERROR "\-1\.23457 truncated"
_ int64 = -1.23456789e-1 // ERROR "\-0\.123457 truncated"
_ int64 = -1.23456789e-10 // ERROR "\-1\.23457e\-10 truncated"
_ int64 = -1.23456789e-100 // ERROR "\-1\.23457e\-100 truncated"
_ int64 = -1.23456789e-1000 // ERROR "\-1\.23457e\-1000 truncated"
_ int64 = -1.23456789e-10000 // ERROR "\-1\.23457e\-10000 truncated"
_ int64 = -1.23456789e-100000 // ERROR "\-1\.23457e\-100000 truncated"
_ int64 = -1.23456789e-1000000 // ERROR "\-1\.23457e\-1000000 truncated"
)
|