Skip to content

testing: roundDown10 sometimes rounds too far #5599

Description

@kr
Run http://play.golang.org/p/kX3sgrx7c4

This calls roundDown10 (copied verbatim from package testing)
with 10001 as input.

What is the expected output?

10000

What do you see instead?

1000

Solution:

Test n > 10 should be n >= 10.

This is the least consequential bug I can ever remember reporting.

I'll submit a code review if no one beats me to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions