Skip to content

binary: improve tests for invalid numbers #109

Closed

Description

@kytrinyx

We should have separate tests for:

  • alphabetic characters at the beginning of a valid binary number
  • alphabetic characters at the end of a valid binary number
  • alphabetic characters in the middle of an otherwise valid binary number
  • invalid digits (e.g. 2)

If the test suite for binary has test cases that cover these edge cases, this issue can safely be closed.

See exercism/problem-specifications#95

Activity

  1. matthewmorgan commented on Apr 7, 2016

    @matthewmorgan
    Contributor

    This track is missing a few of the above mentioned tests. It does have a test that puts alphabetic characters at the beginning AND end of the input (in the same single test). To make it complete we should add:

    • alphabetic characters at the beginning of a valid binary number
    • alphabetic characters at the end of a valid binary number
    • alphabetic characters in the middle of an otherwise valid binary number
  2. kytrinyx commented on Apr 7, 2016

    @kytrinyx
    MemberAuthor

    Yeah, you could probably split the existing test into two tests (I think if you have one for the beginning and one for the end, a test for both beginning and end is redundant).

  3. kytrinyx commented on Jul 17, 2016

    @kytrinyx
    MemberAuthor

    I'm going to go ahead and close this, due to exercism/problem-specifications#279

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions