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

Issue 9926043: code review 9926043: testing: fix rounding error in roundDown10 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 11 months ago by dave
Modified:
10 years, 11 months ago
Reviewers:
minux1, r, kr
CC:
minux1, kr, r, golang-dev
Visibility:
Public.

Description

testing: fix rounding error in roundDown10 Fixes issue 5599. Thanks to minux.ma for the suggested fix. As we now have a harness to test testing internal functions I added some coverage for testing.roundUp, as it is the main consumer of roundDown10.

Patch Set 1 #

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

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

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

Total comments: 3

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

Total comments: 3

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

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

Patch Set 8 : diff -r 31ab5b976437 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -13 lines) Patch
M src/pkg/testing/benchmark.go View 1 2 3 4 5 6 2 chunks +9 lines, -6 lines 0 comments Download
M src/pkg/testing/benchmark_test.go View 1 2 3 4 5 6 1 chunk +33 lines, -6 lines 0 comments Download
M src/pkg/testing/export_test.go View 1 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 12
dave_cheney.net
Hello minux.ma@gmail.com, kr@xph.us (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 11 months ago (2013-05-31 23:37:59 UTC) #1
dave_cheney.net
Hello minux.ma@gmail.com, kr@xph.us (cc: golang-dev@googlegroups.com), Please take another look.
10 years, 11 months ago (2013-06-01 01:58:02 UTC) #2
minux1
LGTM.
10 years, 11 months ago (2013-06-01 02:13:48 UTC) #3
kr
Should roundUp and roundDown10 return n if n is already of the desired form? Doesn't ...
10 years, 11 months ago (2013-06-01 02:17:31 UTC) #4
minux1
On Sat, Jun 1, 2013 at 10:17 AM, <kr@xph.us> wrote: > Should roundUp and roundDown10 ...
10 years, 11 months ago (2013-06-01 02:23:46 UTC) #5
r
No, "round down" means "round to the nearest integer, downwards if necessary." If you round ...
10 years, 11 months ago (2013-06-01 03:07:55 UTC) #6
dave_cheney.net
On 2013/06/01 03:07:55, r wrote: > No, "round down" means "round to the nearest integer, ...
10 years, 11 months ago (2013-06-01 04:35:32 UTC) #7
kr
Analogously to "round down", "round up" must mean "round to the nearest integer, upwards if ...
10 years, 11 months ago (2013-06-01 06:12:54 UTC) #8
dave_cheney.net
PTAL. Code and test adjusted to match the specification in the comment.
10 years, 11 months ago (2013-06-01 06:29:16 UTC) #9
kr
LGTM
10 years, 11 months ago (2013-06-01 06:32:50 UTC) #10
r
LGTM
10 years, 11 months ago (2013-06-01 13:43:53 UTC) #11
dave_cheney.net
10 years, 11 months ago (2013-06-01 23:13:33 UTC) #12
*** Submitted as https://code.google.com/p/go/source/detail?r=a115231d557b ***

testing: fix rounding error in roundDown10

Fixes issue 5599.

Thanks to minux.ma for the suggested fix.

As we now have a harness to test testing internal functions I added some
coverage for testing.roundUp, as it is the main consumer of roundDown10.

R=minux.ma, kr, r
CC=golang-dev
https://codereview.appspot.com/9926043
Sign in to reply to this message.

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