Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resistor-color-trio: Add missing test case from description #1652

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

miguelraz
Copy link

@miguelraz miguelraz commented Apr 28, 2020

resolves #1651

  • brought to y'all by the Julia Gang

addresses exercism#1651 

- brought to y'all by the Julia Gang
@SaschaMann SaschaMann changed the title Update canonical-data.json resistor-color-trio: Add missing test case from description Apr 28, 2020
@SaschaMann
Copy link
Contributor

This test case is already given as example in the description, but not covered by tests. I'd argue it's a bug fix and not covered by #1560.

@yawpitch
Copy link
Contributor

I'd argue that it is not a bug and that this PR is blocked by #1560. As stated by @iHiD in the body of that Issue a test would have to be wrong, not merely missing, to be considered a bug:

We will still accept bugfixes (if tests are wrong) and improvements to the copy around exercises, as long as they do not alter the substance of an exercise

Emphasis added.

Though it would take some effort to survey them all, I believe there are a number of description.md files mention examples that do not literally exist in the tests. Certainly there are many descriptions that make assumptions / implications not actually addressed in tests. If this addition isn't actually testing anything new and otherwise uncovered in the tests -- which it isn't obviously doing, as all three colors appear in the same orientation in other tests -- then I'd argue it's not actually necessary, on top of not really being a bug fix.

@rpottsoh
Copy link
Member

@miguelraz thanks for the making the change I requested. I have to agree with @yawpitch though. I recommend following the suggestion outlined in #1560 that suggests that changes be added at the local (track) level. This test case could be added to the track where you came across this issue in the canonical data. @exercism/julia was it?

Personally I think the suggested change is a good one for the canonical data. I am going to close this PR for now.

This PR should be reconsidered whenever the restrictions of #1560 are reversed.

@rpottsoh rpottsoh closed this Apr 28, 2020
@miguelraz
Copy link
Author

Thanks, I think @SaschaMann can help with the Julia local changes.

@iHiD iHiD added the hold label Apr 29, 2020
@iHiD
Copy link
Member

iHiD commented Apr 29, 2020

I've reopening with the hold tag for us to consider after #1560 is reversed.

@rpottsoh rpottsoh reopened this Apr 29, 2020
Copy link
Contributor

@SaschaMann SaschaMann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(just to block the merge button while it's on hold)

@iHiD iHiD marked this pull request as draft April 29, 2020 14:28
@iHiD
Copy link
Member

iHiD commented Apr 29, 2020

@SaschaMann Nice idea. I believe y'all can also now convert PRs to drafts (I've just done that here)

@miguelraz
Copy link
Author

I believe #1560 is now reversed and this can be merged @SaschaMann .

@SaschaMann
Copy link
Contributor

It needs to be rebased, I think. The version can be dropped and the test case itself needs a UUID now.

@SaschaMann SaschaMann marked this pull request as ready for review November 22, 2020 11:09
@SaschaMann SaschaMann removed the hold label Nov 22, 2020
Base automatically changed from master to main January 27, 2021 15:31
@SaschaMann SaschaMann self-requested a review July 18, 2021 07:38
Copy link
Contributor

@angelikatyborska angelikatyborska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if 3300 ohms is the correct return value for this case. The description says:

When we get more than a thousand ohms, we say "kiloohms".

3300 is more than a thousand, so my interpretation of the description would be that the expected value is 3,3 kiloohms.

@cmcaine
Copy link
Contributor

cmcaine commented Mar 14, 2022 via email

@angelikatyborska
Copy link
Contributor

@cmcaine Huh? I'm not sure where that suggestion comes from. The return values are described as objects with value and unit keys, not strings, so it's just about using a float for the value. AFAIK you don't need to deal with locale specific separators to use a float. Unless we're coding in Excel 😁

@SaschaMann
Copy link
Contributor

SaschaMann commented Mar 14, 2022

The return values are described as objects with value and unit keys, not strings, so it's just about using a float for the value.

Some implementations of this exercise use strings as expected value, e.g. C#'s. Doesn't change your argument because the language would deal with it, but it's worth keeping that in mind for these tests.

@SaschaMann SaschaMann linked an issue Mar 22, 2022 that may be closed by this pull request
@SleeplessByte
Copy link
Member

https://neurophysics.ucsd.edu/courses/physics_120/resistorcharts.pdf switches at exactly 1000 ohms. I find that compelling enough to fix the description to 3.3 k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test to resistors-colors-trio Resistor Color Trio: add test case >1000 but not divisible by 1000
8 participants