diff --git a/tests/FilesT.cpp b/tests/FilesT.cpp index 4c3ea2da..59a4522e 100644 --- a/tests/FilesT.cpp +++ b/tests/FilesT.cpp @@ -352,4 +352,15 @@ TEST_CASE("[Files] Default path is ignored for generators") synth.loadSfzFile(fs::current_path() / "tests/TestFiles/default_path_generator.sfz"); REQUIRE(synth.getNumRegions() == 1); REQUIRE(synth.getRegionView(0)->sample == R"(*sine)"); +} + + +TEST_CASE("[Files] Set CC applies properly to all channels") +{ + sfz::Synth synth; + synth.loadSfzFile(fs::current_path() / "tests/TestFiles/set_cc.sfz"); + for (int channel = 0; channel < 16; channel++) { + REQUIRE(synth.getMidiState().getCCValue(channel, 142) == 63); + REQUIRE(synth.getMidiState().getCCValue(channel, 61) == 122); + } } \ No newline at end of file diff --git a/tests/TestFiles/set_cc.sfz b/tests/TestFiles/set_cc.sfz new file mode 100644 index 00000000..8e162f9f --- /dev/null +++ b/tests/TestFiles/set_cc.sfz @@ -0,0 +1,3 @@ + set_cc61=122 + set_cc142=63 + sample=snare.wav \ No newline at end of file