mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-03-08 19:14:05 +00:00
testing/protopack: fix format precision
64-bit floating point numbers require 16 hexadecimal digits, not 8. Change-Id: I127b9b8e8c52de53f6fa58a58c4bf63f94196e1f Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/234697 Reviewed-by: Herbie Ong <herbie@google.com>
This commit is contained in:
parent
118baf6390
commit
b10fcbc76b
@ -586,7 +586,7 @@ func formatToken(t Token, source, multi bool) (s string) {
|
||||
case math.Float64bits(float64(math.NaN())) == math.Float64bits(float64(f)):
|
||||
s = fmt.Sprintf("%T(math.NaN())", v)
|
||||
default:
|
||||
s = fmt.Sprintf("%T(math.Float64frombits(0x%08x))", v, math.Float64bits(float64(f)))
|
||||
s = fmt.Sprintf("%T(math.Float64frombits(0x%016x))", v, math.Float64bits(float64(f)))
|
||||
}
|
||||
break
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user