-
Notifications
You must be signed in to change notification settings - Fork 92
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: Add tests for the various parsers and cover edge cases #947
Conversation
* Sanitize numbers to ensure within [0-255] * Gracefully handle incorrect number of values * Simplify logic * Add tests to cover all edge cases Signed-off-by: Lawrence Brooks <[email protected]>
Signed-off-by: Lawrence Brooks <[email protected]>
Signed-off-by: Lawrence Brooks <[email protected]>
Signed-off-by: Lawrence Brooks <[email protected]>
* colormap values are [0-palette_length) * palette_length is undefined, just ensure [0 * keymap values are [0-??), just ensure [0 * palette values are [0-255], ensure [0-255] Signed-off-by: Lawrence Brooks <[email protected]>
Hey, @lbrooks !! Thanks for your contribution! I have been adding tests to cover better all the possible macro scenarios. With the expanded coverage using a backup as a data source, the tests fail with the refactored function, so, could you check it? |
I'm closing this one as it's gone through a number of updates and depends on fixing the Focus.unit.ts file (ignoring the test case due to the change in how SerialPort is imported). I will cherry pick the tests and refactoring in this PR to another PR which doesn't have the additional noise. |
List of updates to the method: