Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1896)

Issue 103480043: code review 103480043: fmt: fix signs when zero padding. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by r
Modified:
9 years, 10 months ago
Reviewers:
jscrockett01, rsc
CC:
golang-codereviews, kortschak, rsc
Visibility:
Public.

Description

fmt: fix signs when zero padding. Bug was introduced recently. Add more tests, fix the bugs. Suppress + sign when not required in zero padding. Do not zero pad infinities. All old tests still pass. This time for sure! Fixes issue 8217.

Patch Set 1 #

Total comments: 1

Patch Set 2 : diff -r f866ee1cef9d https://code.google.com/p/go #

Total comments: 2

Patch Set 3 : diff -r 2ed76d7a29e1 https://code.google.com/p/go #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+151 lines, -43 lines) Patch
M src/pkg/fmt/fmt_test.go View 1 2 2 chunks +113 lines, -2 lines 1 comment Download
M src/pkg/fmt/format.go View 1 2 chunks +38 lines, -41 lines 0 comments Download

Messages

Total messages: 7
r
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
9 years, 10 months ago (2014-06-16 18:07:49 UTC) #1
kortschak
https://codereview.appspot.com/103480043/diff/1/src/pkg/fmt/fmt_test.go File src/pkg/fmt/fmt_test.go (right): https://codereview.appspot.com/103480043/diff/1/src/pkg/fmt/fmt_test.go#newcode529 src/pkg/fmt/fmt_test.go:529: {"% 020f", math.Inf(1), " Inf"}, Pin down complex as ...
9 years, 10 months ago (2014-06-16 23:56:08 UTC) #2
r
Hello golang-codereviews@googlegroups.com, dan.kortschak@adelaide.edu.au (cc: golang-codereviews@googlegroups.com), Please take another look.
9 years, 10 months ago (2014-06-17 18:21:54 UTC) #3
rsc
https://codereview.appspot.com/103480043/diff/20001/src/pkg/fmt/fmt_test.go File src/pkg/fmt/fmt_test.go (right): https://codereview.appspot.com/103480043/diff/20001/src/pkg/fmt/fmt_test.go#newcode679 src/pkg/fmt/fmt_test.go:679: var signs = []float64{1, -1} 1, -1, 0 https://codereview.appspot.com/103480043/diff/20001/src/pkg/fmt/fmt_test.go#newcode709 ...
9 years, 10 months ago (2014-06-17 21:50:30 UTC) #4
rsc
LGTM once test changes pass
9 years, 10 months ago (2014-06-17 21:50:39 UTC) #5
r
*** Submitted as https://code.google.com/p/go/source/detail?r=777dd5a434db *** fmt: fix signs when zero padding. Bug was introduced recently. ...
9 years, 10 months ago (2014-06-17 21:55:55 UTC) #6
jscrockett01
9 years, 10 months ago (2014-06-18 14:19:27 UTC) #7
Message was sent while issue was closed.
I know this change has already gone in, my comment is simply for going forward.

https://codereview.appspot.com/103480043/diff/40001/src/pkg/fmt/fmt_test.go
File src/pkg/fmt/fmt_test.go (right):

https://codereview.appspot.com/103480043/diff/40001/src/pkg/fmt/fmt_test.go#n...
src/pkg/fmt/fmt_test.go:679: var signs = []float64{1, 0, -1}
Can we test Inf as well, since that's been a sore spot?

var signs = []float64{1, 0, -1, math.Inf(+1),math.Inf(-1)}
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b