-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Add ocr-numbers test suite, update description #291
Conversation
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.
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. |
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.
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", |
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.
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."
If nothing else comes up by the weekend, I'll merge. |
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.