Zeugma440 / atldotnet

Fully managed, portable and easy-to-use C# library to read and edit audio data and metadata (tags) from various audio formats, playlists and CUE sheets
MIT License
440 stars 60 forks source link

LyricsPhrase - Return true for equals if a and b are null #228

Closed nlogozzo closed 9 months ago

nlogozzo commented 10 months ago

Fixes the issue where:

LyricsPhrase? x = null;
var y = x == null;
//y would be false
codecov[bot] commented 10 months ago

Codecov Report

Patch coverage: 75.00% and no project coverage change.

Comparison is base (b1e35d6) 89.29% compared to head (51a0fa8) 89.29%. Report is 3 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #228 +/- ## ======================================= Coverage 89.29% 89.29% ======================================= Files 94 94 Lines 18622 18632 +10 Branches 2727 2729 +2 ======================================= + Hits 16628 16637 +9 Misses 1428 1428 - Partials 566 567 +1 ``` | [Files Changed](https://app.codecov.io/gh/Zeugma440/atldotnet/pull/228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [ATL/Entities/LyricsInfo.cs](https://app.codecov.io/gh/Zeugma440/atldotnet/pull/228?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-QVRML0VudGl0aWVzL0x5cmljc0luZm8uY3M=) | `93.75% <75.00%> (-0.32%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Zeugma440 commented 10 months ago

CodeCov says some of the new code isn't covered.

Could you please add the corresponding unit tests?

https://github.com/Zeugma440/atldotnet/blob/main/ATL.unit-test/Misc/LyricsSortTest.cs

Thanks~

nlogozzo commented 9 months ago

Could you please add the corresponding unit tests?

I have no experience with tests but I think I did it right 😅

Zeugma440 commented 9 months ago

Indeed, what you added looks good. However, there's still an uncovered part of the code that looks fishy

image

Wouldn't that produce null != null? Are you certain that's what you want to acheive?

nlogozzo commented 9 months ago

Wouldn't that produce null != null? Are you certain that's what you want to acheive?

Ah you're right...fixed :)

sonarcloud[bot] commented 9 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

89.3% 89.3% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Read more here

Zeugma440 commented 9 months ago

Looks fine! Thanks for your contribution 😄

Zeugma440 commented 9 months ago

Available on today's v5.07