-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fix AllYourBase to follow problem specs #1370
Conversation
Thank you for contributing to Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:
Automated comment created by PR Commenter 🤖. |
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.
Thank you for bringing this to my attention! Actually according to the Exercism-wide problem specifications, the error should be "input base must be >= 2"
in case both input and output bases are negative (see https://github.com/exercism/problem-specifications/blob/main/exercises/all-your-base/canonical-data.json#L251-L263).
Could you modify your PR to follow that expectation?
TIL about the problem-specifications repo. In fact I don't believe there's much to change on the the tests if the specification must be followed. Would make sense to update the elixir instructions following the error specification? |
You mean the file What we need is a single word change in the test file (compared to before your initial changes), to change the error message from |
I follow you now, sorry, I thought it was already correct. Thanks for walking me through it. Just patched the correct fix. |
On the problem specification for this exercise, we should follow what is defined. Matching the input error first in case both are invalid. For All your base exercise, we need it's valid to return input or output error when both are provided. This commit allows both to be returned from the tested function
test was failing because |
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.
Thank you!
For All your base exercise, we need it's valid to return input or output error when both are provided. This commit allows both to be returned from the tested function.
Because we are expecting an error to be either input or output, I'm using a regex on the tests to match any of the errors to be valid.