-
-
Notifications
You must be signed in to change notification settings - Fork 554
raindrops: include edge cases in tests #370
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
Conversation
This is great, thank you. Would you mind updating the commit message to explain how those edge cases were being hit before? Also, we have reorganized the files—would you mind rebasing this onto master? |
If I could make a small request - I would like it if the whitespace changes are in a separate commit than the new test case additions. The reason is so that someone who wants to just understand what new test cases are added can just look at that commit, and not be distracted by the whitespace changes. |
Should test 27 be the simpler case? Or at least be included? If that is passing, then the power of 5 and power of 7 may also be caught. For history on this, see the discussion on exercism. |
Hi, I changed the commit message on my local and also put the spacing changes (which were caused by adding new tests) in another commit. I'd be happy to include 27 as a test case, too. However, when I type I'm not sure what's causing this? Typing
Help appreciated, thanks! |
The remote looks correct to me. Have you fetched from exercism's copy of the repo with I believe you will want to run
|
The commits a82a70c and 554c929 look good, and it would be good if those were the only two commits in this PR (as seen at https://github.com/exercism/x-common/pull/370/commits ) instead of including unrelated commits such as Erik's. If all else fails, you could:
|
@McEileen I noticed that your commits are not associated to your user. You can take a look at commits are not linked to any user. Hope this helps 😄 |
77ae564
to
22f4f0d
Compare
@nickborromeo Very helpful link, thanks! Strangely, when I clicked on the individual commits, it now shows my icon as a small icon in the lower right corner of the grey octocat icon, and it says I'm going to squash all my commits into two commits now(the test cases and spacing changes), which I hope will resolve the issue. |
…wer of something, but did not necessarily have 3, 5 or 7 as a factor
543c93a
to
59fa45e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think this looks good!
One question I would like to ask of everyone: Is the purpose of the tests such as 8 (2^3), 27 (3^3), 3125 (5^5) clear from just looking at the file and/or factorising the number? If it is not, maybe add a comment via "comment": "something"
or "#": "something"
.
If nobody has anything to say in 48 hours I'll merge by default.
I am wondering how testing for 0 would be communicative, in that it is not prime, and is a factor of any number, and a test for it resulting in the translations in order would ensure that is covered as well. Two commits rather than one may not be necessary. |
Having the whitespace in the same commit as the additional tests is distracting to reviewers. I would very much like them to stay as two commits, please. Edit: I do realize I am stating a personal preference here, since all I can say for sure is that it is distracting to me, and not whether it will be distracting to all reviewers. I do speak truthfully about what I know about myself, though. And this is in keeping with the principle of having one logical change per commit (a la https://www.kernel.org/doc/Documentation/SubmittingPatches "3) Separate your changes.") |
zero is indeed an interesting case. If we are just going for divisibility, it is divisible by all the integers (well, not itself). If we think about it in terms of factors, would we also say that zero has all integers as factors? Testing that the order is right has already been done by 105 though, so adding zero would just to be demonstrate the properties of zero, get people to think mathematically. Is it something we want? |
Considering that there are two possible results for zero, testing it would push people toward a more restricted set of implementations. If we don't test it, we get more diversity! |
Sounds good. Let us take this as is. If we do change our mind about zero, that can always come in a separate PR of course! Or tracks can note a specific exception they wished to make. |
I just wanted to add my voice to this: I like having formatting changes separately. This also goes for refactoring vs new changes. |
raindrops: Add new tests from exercism/problem-specifications#370
Did anyone notice what fantastic teamwork went down in the PR? This is a good example of what I love about this community. :) |
Thanks for all the helpful feedback! With the exception of correcting typos, this was the first PR I've made to exercism, and I appreciated all the help. |
Added in exercism/problem-specifications#370 Although I doubt anyone will make the same mistake in this language, I don't care enough to declare that we should elide these cases. Note that even though Rust now has the same cases as 1.0.0, we don't have descriptions like in exercism/problem-specifications#450. I don't find them terribly necessary, but I suppose they can be added if they seem good. We would likely no longer be able to have the tests on one line in that case, since some descriptions are rather long.
Generator: Add message if x-common doesnt exist.
I added new tests for edge cases after opening issue #434 on the Ruby track. exercism/ruby#434