Added a test with bad/removed regions

This commit is contained in:
Paul Ferrand 2020-01-04 16:33:02 +01:00
parent 67fdd6766f
commit 7fbcf05486
2 changed files with 13 additions and 0 deletions

View file

@ -61,6 +61,15 @@ TEST_CASE("[Files] Underscore opcodes (underscore_opcodes.sfz)")
REQUIRE(synth.getRegionView(0)->loopMode == SfzLoopMode::loop_sustain);
}
TEST_CASE("[Files] (regions_bad.sfz)")
{
sfz::Synth synth;
synth.loadSfzFile(fs::current_path() / "tests/TestFiles/Regions/regions_bad.sfz");
REQUIRE(synth.getNumRegions() == 2);
REQUIRE(synth.getRegionView(0)->sample == "dummy.wav");
REQUIRE(synth.getRegionView(1)->sample == "dummy.wav");
}
TEST_CASE("[Files] Local include")
{
sfz::Synth synth;

View file

@ -0,0 +1,4 @@
<region> sample=dummy.wav
<region> sample=nonexistent.wav
<region> sample=nonexistent.wav
<region> sample=dummy.wav