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

fix for SplatColor Equal and tests for SplatColor #731

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

fix
feature
tests

What is the current behaviour?

SplatColor == was looking at how the SplatColor was generated to compare if equal
SplatColor != was just comparing two instances directly

What is the new behaviour?

Now using ARGB comparision and if all are the same its equal.
the inverse of == is used for !=.

Added KnownName lookup for ARGB which will automatically convert to a KnownName generated Color if it is a match to a KnownColor.

What might this PR break?

if user was checking equal and relying on the way it was generated for comparison to be true this will no longer be true.

Please check if the PR fulfils these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

added a KnownColor of Empty

SplatColor == was looking at how the SplatColor was generated to compare if equal
Now using ARGB comparision and if all are equal its equal.
Added KnownName lookup for ARGB which will automatically convert to a KnownName generated Color if it is a match to a KnownColor.
@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #731 (6dff952) into main (7d25d07) will increase coverage by 1.54%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #731      +/-   ##
==========================================
+ Coverage   71.77%   73.31%   +1.54%     
==========================================
  Files         101       98       -3     
  Lines        4843     4835       -8     
==========================================
+ Hits         3476     3545      +69     
+ Misses       1367     1290      -77     
Impacted Files Coverage Δ
src/Splat.Drawing/Colors/SplatColor.cs 81.30% <84.00%> (+53.88%) ⬆️
src/Splat.Drawing/Colors/KnownColors.cs 97.22% <100.00%> (+<0.01%) ⬆️
src/Splat/Logging/LogHost.cs 77.77% <0.00%> (+44.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d25d07...6dff952. Read the comment docs.

@glennawatson glennawatson merged commit c54ef66 into main Jul 25, 2021
@glennawatson glennawatson deleted the tests_SplatColor branch July 25, 2021 17:27
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants