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

Add ocr-numbers test suite, update description #291

Merged
merged 3 commits into from
Jul 16, 2016

Conversation

IanWhitney
Copy link
Contributor

The tests come from the existing implementations. Most languages that
currently implement this problem use the exact same tests. The tests of
failures only exist in Python and Swift, but I thought they were useful
so I included them here.

While I've kept the existing tests, I have reordered them so that they
follow the problem as described in the readme. The problem progresses
from handling just single binary numbers, then garbling, then long binary
strings, then decimal numbers, then multi-line numbers.

I have also reworked the readme, clarifying the steps of the problem.

The tests come from the existing implementations. Most languages that
currently implement this problem use the exact same tests. The tests of
failures only exist in Python and Swift, but I thought they were useful
so I included them here.

While I've kept the existing tests, I have reordered them so that they
follow the problem as described in the readme. The problem progresses
from handling just single binary numbers, then garbling, then long binary
strings, then decimal numbers, then multi-line numbers.

I have also reworked the readme, clarifying the steps of the problem.
@IanWhitney
Copy link
Contributor Author

A quick list of current implementations and their tests. Not very exciting, since there is so much similarity.

https://gist.github.com/IanWhitney/0d847ff8d4ac713a81c3d81649d28a6b


A simple binary font has been constructed using only pipes and
underscores.
To begin with, convert a simple binary font to a string containing 0 and 1.
Copy link
Member

Choose a reason for hiding this comment

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

do you mean for step one to be a single digit, or multiple digits? If it is to be a single digit, "0 and 1" seems to imply the single digit should simultaneously be both, which would not be

"expected": "1234567890"
},
{
"description": "Numbers separated by empty lines are recognized. Empty lines are replaced with commas",
Copy link
Member

Choose a reason for hiding this comment

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

well, it's not really that there's any additional separation, since the number of lines is still a multiple of 4, and the fourth line has always been empty. the trailing empty line was not replaced with a comma either. I may have just said "Recognizes multiple lines of numbers. The lines are joined by commas."

@IanWhitney
Copy link
Contributor Author

If nothing else comes up by the weekend, I'll merge.

@IanWhitney IanWhitney merged commit c4c5f25 into exercism:master Jul 16, 2016
@IanWhitney IanWhitney deleted the ocr_numbers_test_suite branch July 16, 2016 12:28
emcoding pushed a commit that referenced this pull request Nov 19, 2018
Use path relative to the file in the bin directory rather than the
current working directory.

for enable-executable and executable-tests-check
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.

3 participants