update the tests for the normalized modifier

This commit is contained in:
Paul Ferrand 2020-03-29 17:12:41 +02:00
parent 4b4dea97e1
commit 0cf7b01d6b
2 changed files with 12 additions and 1 deletions

View file

@ -311,7 +311,7 @@ TEST_CASE("[Files] wrong (overlapping) replacement for defines")
REQUIRE( synth.getRegionView(1)->keyRange.getEnd() == 57 );
REQUIRE( !synth.getRegionView(2)->amplitudeCC.empty() );
REQUIRE( synth.getRegionView(2)->amplitudeCC.contains(10) );
REQUIRE( synth.getRegionView(2)->amplitudeCC.getWithDefault(10) == 34.0f );
REQUIRE( synth.getRegionView(2)->amplitudeCC.getWithDefault(10) == 0.34f );
}
TEST_CASE("[Files] Specific bug: relative path with backslashes")

View file

@ -1430,6 +1430,17 @@ TEST_CASE("[Region] Parsing opcodes")
region.parseOpcode({ "note_selfmask", "garbage" });
REQUIRE(region.selfMask == SfzSelfMask::dontMask);
}
SECTION("amplitude_cc")
{
REQUIRE(region.amplitudeCC.empty());
region.parseOpcode({ "amplitude_cc1", "40" });
REQUIRE(region.amplitudeCC.contains(1));
REQUIRE(region.amplitudeCC[1] == 0.40_a);
region.parseOpcode({ "amplitude_oncc2", "30" });
REQUIRE(region.amplitudeCC.contains(2));
REQUIRE(region.amplitudeCC[2] == 0.30_a);
}
}
// Specific region bugs