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

fixed #58 #59

Merged
merged 1 commit into from
Jul 8, 2022
Merged

fixed #58 #59

merged 1 commit into from
Jul 8, 2022

Conversation

dominikwilkowski
Copy link
Owner

@dominikwilkowski dominikwilkowski commented Jul 8, 2022

This was a fun bug. Thanks @kderholtvisma for the report.

So in rust the compiler checks that a match covers all it's permutations automatically so I don't have to make sure that when I expect to return a number between 0-255 that I miss one. When I ported this over to node I mistyped two conditions which resulted in two numbers not being covered in the node implementation. One of those numbers happened to be the number representation for yellow.

I have now added a test to node to make sure I cover all 256 permutations (how I found the other gap) and added tests for rust to compare the output of both rust and node against a fixture for all allowed colors in the gradients.

This last test suit led me to discover that I don't support yellow in the rust gradient implementation and gray and grey in the node one. So both packages will be bumped.
🎉

@dominikwilkowski dominikwilkowski merged commit 27f8c68 into released Jul 8, 2022
@dominikwilkowski dominikwilkowski deleted the fix_58 branch July 8, 2022 03:49
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.

1 participant