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

Notemapper completeness: equivalents around skipped flat-keys, and ♯-support #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

juleskers
Copy link
Collaborator

I have recently been reading architecture articles on not striving for 100% code coverage.
I found this very enlightening, as it's the opposite to what I've been doing so far.

The articles posit that 100% coverage as a blind goal leads to very brittle tests, needless busywork when refactoring codes (due to overfitted test-cases), and in general is a dogma that should not be blindly followed.
Instead, the articles advise to use coverage-gaps to guide deeper analysis of the productive code, looking for holes that bugs could theoretically hide in.

I revisited my (spotty) NoteMapperTest while attempting to keep this mindset.
At the same time, reading about fuzz-testing inspired me to do an unbiased "all possible notes" test, which indeed uncovered gaps.

Ironically, I did end up with 100% line coverage 😝
(Though my branch-coverage is stuck at 75%, and I can't seem to figure out why)

P.S. The articles, in case others feel inspired.


As for release-cutting: since this has zero user-visible benefit, I wouldn't mind if this is not included in the release for the Brother-John-Song (#88, #89), so please don't consider this urgent.

Jules Kerssemakers added 3 commits January 23, 2024 13:53
Previously, ♭ already worked, but we somehow overlooked ♯.

Choose a string.replace strategy to collapse the cases,
rather than adding another 26 lines of almost-redundant `case ♯:`,
to keep the boilerplate to a minimum.
For consistency, do the same for the pre-existing `case ♭:`.
@juleskers juleskers self-assigned this Jan 23, 2024
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