surge-synthesizer / tuning-library

Micro-tuning format parsing and frequency finding as a header-only C+ library
https://surge-synth-team.org/tuning-library/
MIT License
84 stars 15 forks source link

test typos? #50

Closed chinenual closed 3 years ago

chinenual commented 3 years ago

In the new tests for skipped notes, the "gaps" tests assert the modulo scale positions as midi notes - I suspect a typo:

        for (int k = 0; k < 128; ++k)
        {
            int i = k % 12;
            bool isOn = i == 0 || i == 2 || i == 4 || i == 5 || i == 7 || i == 
9 || i == 11;
            INFO(k << " scpos=" << i << " isOn = " << isOn);
            REQUIRE(t.isMidiNoteMapped(i) == isOn);
        }

was probably intended to test

            REQUIRE(t.isMidiNoteMapped(k) == isOn);

if so, there are similar typos in

    SECTION("Gaps in the Maps")
    SECTION("Gaps in the Maps KBM Only")
    SECTION("Tuning with Gaps and Interpolation")
baconpaul commented 3 years ago

Oh ha yeah that is a typo good find. It happens to work since I am testing against a keyboard model which has periodicity 12 but the test would break otherwise. Thank you.

baconpaul commented 3 years ago

51 will fix this .Will merge once CI is done (pipelines are a bit full with some builds I'm doing for surge proper right now). Great catch thank you.