Skip to content

Insufficient test cases for "Resistor Color Expert" #3795

Closed

Description

@xanni

I submitted code that passed all the existing tests but failed to correctly handle some actual resistor values in use in the E48 (2% tolerance) and larger series. There are currently no tests for 5-band resistors where the second band is black, which my earlier iteration handled wrongly.

Activity

  1. github-actions commented on Oct 21, 2024

    @github-actions
  2. BethanyG commented on Oct 22, 2024

    @BethanyG
    Member

    Linking forum discussion.

    Happy to accept suggested test cases and/or PR. 😄

  3. xanni commented on Oct 23, 2024

    @xanni
    ContributorAuthor

    PR created: #3797

  4. BethanyG commented on Oct 24, 2024

    @BethanyG
    Member

    I am going to keep this open until we figure out if we want 3-band cases. I am leaning towards "no", but want to discuss it a bit on the forum first. 😄

  5. deekshahavaragi commented on Dec 13, 2025

    @deekshahavaragi

    I’ve opened a PR with the additional edge-case tests discussed here:

    PR: #4047

    Please let me know if this approach looks good or if any changes are needed. Thanks!

  6. BethanyG commented on Dec 14, 2025

    @BethanyG
    Member

    Hi @deekshahavaragi -- while I appreciate the enthusiasm, the forum discussion related to this came down on the side of no additional edge cases, since they were wandering away from the intent of the exercise. I forgot to close this issue, but will be doing so now.

    Additionally, your PR appears to only have made whitespace changes - was that intentional?

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