Closed XBagon closed 4 years ago
Could you also add tests for the into_u8
method?
Could you also add tests for the
into_u8
method?
I would say it's pretty hard to write a meaningful test here, as the method only does the exact mapping you could test for. So yea, if you want I can write an test, that probably looks very similar to the function😄.
Could you also add tests for the
into_u8
method?I would say it's pretty hard to write a meaningful test here, as the method only does the exact mapping you could test for. So yea, if you want I can write an test, that probably looks very similar to the function😄.
I get your point, it's not the most meaningful test, but still makes a contract with the current codebase. That makes sure no one can accidentally change the values without failing the tests. So there is still a reason to write the tests, would appreciate if you could do that :)
Added some missing Clone and Displays derives for easier library usage. Needed to clone
Note
s myself and added the other ones for completion.Also added
PitchClass::into_u8
for cases when you need the number representation, in my case for calculating the MIDI note number.