-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/color: extend unittest and fix module #19693
Conversation
For reference, see #9940 |
(not sure what you mean by "wrong" so I provided the black-corner case thingy for documentation) |
The test previously tested only one value (black) (for good reason). |
is false with current master for many color values ; and true with this PR; ("black" ist working before and after) |
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.
The code looks good to me and decent test coverage was added.
Please squash the minor style nitpicks directly; the ACK remains valid.
bors merge |
19693: sys/color: extend unittest and fix module r=kfessel a=kfessel ### Contribution description this extends the unittest for sys_color testing more colors ### Testing procedure ``` RIOT_tree/tests/unittests$ make tests-color test ``` will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting)) the new `hsv2rgb` test will succeed ### Issues/PRs references #19614 was the reason i had a look at this #1315 added the rgb2hsv and hsv2rgb function #9940 added the test for black special case https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float) Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
bors retry |
Already running a review |
bors cancel |
Canceled. |
19378: sys: add common imath module mv isin() form test/driver_dac_dds r=kfessel a=benpicco 19693: sys/color: extend unittest and fix module r=kfessel a=kfessel ### Contribution description this extends the unittest for sys_color testing more colors ### Testing procedure ``` RIOT_tree/tests/unittests$ make tests-color test ``` will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting)) the new `hsv2rgb` test will succeed ### Issues/PRs references #19614 was the reason i had a look at this #1315 added the rgb2hsv and hsv2rgb function #9940 added the test for black special case https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float) Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de> Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Build failed (retrying...): |
bors merge |
Already running a review |
19378: sys: add common imath module mv isin() form test/driver_dac_dds r=maribu a=benpicco 19693: sys/color: extend unittest and fix module r=kfessel a=kfessel ### Contribution description this extends the unittest for sys_color testing more colors ### Testing procedure ``` RIOT_tree/tests/unittests$ make tests-color test ``` will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting)) the new `hsv2rgb` test will succeed ### Issues/PRs references #19614 was the reason i had a look at this #1315 added the rgb2hsv and hsv2rgb function #9940 added the test for black special case https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float) Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de> Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Build failed (retrying...): |
19693: sys/color: extend unittest and fix module r=kfessel a=kfessel ### Contribution description this extends the unittest for sys_color testing more colors ### Testing procedure ``` RIOT_tree/tests/unittests$ make tests-color test ``` will fail since our `rgb2hsv` implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting)) the new `hsv2rgb` test will succeed ### Issues/PRs references #19614 was the reason i had a look at this #1315 added the rgb2hsv and hsv2rgb function #9940 added the test for black special case https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float) Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Build failed: |
bors merge |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Contribution description
this extends the unittest for sys_color testing more colors
Testing procedure
will fail since our
rgb2hsv
implementation is wrong (or is using an other colorspace than hsv2rgb (without documenting))the new
hsv2rgb
test will succeedIssues/PRs references
#19614 was the reason i had a look at this
#1315 added the rgb2hsv and hsv2rgb function
#9940 added the test for black special case
https://www.vagrearg.org/content/hsvrgb << some optimization for that function (avoiding float)