Fix pathnames such that tests can run from the project root
This commit is contained in:
parent
023b6cd0d1
commit
e08314f2c8
2 changed files with 30 additions and 30 deletions
|
|
@ -17,7 +17,7 @@ constexpr int blockSize { 256 };
|
|||
TEST_CASE("[Polyphony] Polyphony in hierarchy")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<region> key=61 sample=*sine polyphony=2
|
||||
<group> polyphony=2
|
||||
<region> key=62 sample=*sine
|
||||
|
|
@ -44,7 +44,7 @@ TEST_CASE("[Polyphony] Polyphony in hierarchy")
|
|||
TEST_CASE("[Polyphony] Polyphony groups")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<group> polyphony=2
|
||||
<region> key=62 sample=*sine
|
||||
<group> group=1 polyphony=3
|
||||
|
|
@ -71,7 +71,7 @@ TEST_CASE("[Polyphony] Polyphony groups")
|
|||
TEST_CASE("[Polyphony] group polyphony limits")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<group> group=1 polyphony=2
|
||||
<region> sample=*sine key=65
|
||||
)");
|
||||
|
|
@ -84,7 +84,7 @@ TEST_CASE("[Polyphony] group polyphony limits")
|
|||
TEST_CASE("[Polyphony] Hierarchy polyphony limits")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<group> polyphony=2
|
||||
<region> sample=*sine key=65
|
||||
)");
|
||||
|
|
@ -97,7 +97,7 @@ TEST_CASE("[Polyphony] Hierarchy polyphony limits")
|
|||
TEST_CASE("[Polyphony] Hierarchy polyphony limits (group)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<group> polyphony=2
|
||||
<region> sample=*sine key=65
|
||||
)");
|
||||
|
|
@ -110,7 +110,7 @@ TEST_CASE("[Polyphony] Hierarchy polyphony limits (group)")
|
|||
TEST_CASE("[Polyphony] Hierarchy polyphony limits (master)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<master> polyphony=2
|
||||
<group> polyphony=5
|
||||
<region> sample=*sine key=65
|
||||
|
|
@ -124,7 +124,7 @@ TEST_CASE("[Polyphony] Hierarchy polyphony limits (master)")
|
|||
TEST_CASE("[Polyphony] Hierarchy polyphony limits (limit in another master)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<master> polyphony=2
|
||||
<region> sample=*saw key=65
|
||||
<master>
|
||||
|
|
@ -143,7 +143,7 @@ TEST_CASE("[Polyphony] Hierarchy polyphony limits (limit in another master)")
|
|||
TEST_CASE("[Polyphony] Hierarchy polyphony limits (global)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<global> polyphony=2
|
||||
<group> polyphony=5
|
||||
<region> sample=*sine key=65
|
||||
|
|
@ -159,7 +159,7 @@ TEST_CASE("[Polyphony] Polyphony in master")
|
|||
sfz::Synth synth;
|
||||
synth.setSamplesPerBlock(blockSize);
|
||||
sfz::AudioBuffer<float> buffer { 2, blockSize };
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<master> polyphony=2
|
||||
<group> group=2
|
||||
<region> sample=*sine key=65
|
||||
|
|
@ -192,7 +192,7 @@ TEST_CASE("[Polyphony] Polyphony in master")
|
|||
TEST_CASE("[Polyphony] Self-masking")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<region> sample=*sine key=64 note_polyphony=2
|
||||
)");
|
||||
synth.noteOn(0, 64, 63);
|
||||
|
|
@ -210,7 +210,7 @@ TEST_CASE("[Polyphony] Self-masking")
|
|||
TEST_CASE("[Polyphony] Not self-masking")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/polyphony.sfz", R"(
|
||||
<region> sample=*sine key=66 note_polyphony=2 note_selfmask=off
|
||||
)");
|
||||
synth.noteOn(0, 66, 63);
|
||||
|
|
|
|||
|
|
@ -540,7 +540,7 @@ TEST_CASE("[Synth] sample quality")
|
|||
TEST_CASE("[Synth] Sister voices")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/sister_voices.sfz", R"(
|
||||
<region> key=61 sample=*sine
|
||||
<region> key=62 sample=*sine
|
||||
<region> key=62 sample=*sine
|
||||
|
|
@ -577,7 +577,7 @@ TEST_CASE("[Synth] Apply function on sisters")
|
|||
{
|
||||
sfz::Synth synth;
|
||||
sfz::AudioBuffer<float> buffer { 2, 256 };
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/sister_voices.sfz", R"(
|
||||
<region> key=63 sample=*saw
|
||||
<region> key=63 sample=*saw
|
||||
<region> key=63 sample=*saw
|
||||
|
|
@ -595,7 +595,7 @@ TEST_CASE("[Synth] Sisters and off-by")
|
|||
{
|
||||
sfz::Synth synth;
|
||||
sfz::AudioBuffer<float> buffer { 2, 256 };
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/sister_voices.sfz", R"(
|
||||
<region> key=62 sample=*sine
|
||||
<group> group=1 off_by=2 <region> key=62 sample=*sine
|
||||
<group> group=2 <region> key=63 sample=*saw
|
||||
|
|
@ -615,7 +615,7 @@ TEST_CASE("[Synth] Sisters and off-by")
|
|||
TEST_CASE("[Synth] Release key")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> key=62 sample=*sine trigger=release_key
|
||||
)");
|
||||
synth.noteOn(0, 62, 85);
|
||||
|
|
@ -627,7 +627,7 @@ TEST_CASE("[Synth] Release key")
|
|||
TEST_CASE("[Synth] Release")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> key=62 sample=*silence
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
)");
|
||||
|
|
@ -642,7 +642,7 @@ TEST_CASE("[Synth] Release")
|
|||
TEST_CASE("[Synth] Release (pedal was already down)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> key=62 sample=*silence
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
)");
|
||||
|
|
@ -659,7 +659,7 @@ TEST_CASE("[Synth] Release (pedal was already down)")
|
|||
TEST_CASE("[Synth] Release samples don't play unless there is another playing region that matches")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
)");
|
||||
synth.noteOn(0, 62, 85);
|
||||
|
|
@ -675,7 +675,7 @@ TEST_CASE("[Synth] Release samples don't play unless there is another playing re
|
|||
TEST_CASE("[Synth] Release key (Different sustain CC)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<global>sustain_cc=54
|
||||
<region> key=62 sample=*sine trigger=release_key
|
||||
)");
|
||||
|
|
@ -688,7 +688,7 @@ TEST_CASE("[Synth] Release key (Different sustain CC)")
|
|||
TEST_CASE("[Synth] Release (Different sustain CC)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<global>sustain_cc=54
|
||||
<region> key=62 sample=*silence
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
|
|
@ -704,7 +704,7 @@ TEST_CASE("[Synth] Release (Different sustain CC)")
|
|||
TEST_CASE("[Synth] Sustain threshold default")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
)");
|
||||
synth.noteOn(0, 62, 85);
|
||||
|
|
@ -716,7 +716,7 @@ TEST_CASE("[Synth] Sustain threshold default")
|
|||
TEST_CASE("[Synth] Sustain threshold")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<global> sustain_lo=63
|
||||
<region> key=62 sample=*silence
|
||||
<region> key=62 sample=*sine trigger=release
|
||||
|
|
@ -762,7 +762,7 @@ const std::vector<const sfz::Voice*> getActiveVoices(const sfz::Synth& synth)
|
|||
TEST_CASE("[Synth] Release (Multiple notes, release_key ignores the pedal)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release_key
|
||||
)");
|
||||
synth.noteOn(0, 62, 85);
|
||||
|
|
@ -786,7 +786,7 @@ TEST_CASE("[Synth] Release (Multiple notes, release_key ignores the pedal)")
|
|||
TEST_CASE("[Synth] Release (Multiple notes, release, cleared the delayed voices after)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=*silence
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release
|
||||
loopmode=one_shot ampeg_attack=0.02 ampeg_release=0.1
|
||||
|
|
@ -816,7 +816,7 @@ TEST_CASE("[Synth] Release (Multiple notes, release, cleared the delayed voices
|
|||
TEST_CASE("[Synth] Release (Multiple notes after pedal is down, release, cleared the delayed voices after)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=*silence
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release
|
||||
loopmode=one_shot ampeg_attack=0.02 ampeg_release=0.1
|
||||
|
|
@ -846,7 +846,7 @@ TEST_CASE("[Synth] Release (Multiple notes after pedal is down, release, cleared
|
|||
TEST_CASE("[Synth] Release (Multiple note ons during pedal down)")
|
||||
{
|
||||
sfz::Synth synth;
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=*silence
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release
|
||||
loopmode=one_shot ampeg_attack=0.02 ampeg_release=0.1
|
||||
|
|
@ -876,8 +876,8 @@ TEST_CASE("[Synth] No release sample after the main sample stopped sounding by d
|
|||
synth.setSamplesPerBlock(4096);
|
||||
sfz::AudioBuffer<float> buffer { 2, 4096 };
|
||||
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
<region> lokey=62 hikey=64 sample=tests/TestFiles/closedhat.wav loop_mode=one_shot
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=closedhat.wav loop_mode=one_shot
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release
|
||||
loopmode=one_shot ampeg_attack=0.02 ampeg_release=0.1
|
||||
)");
|
||||
|
|
@ -911,8 +911,8 @@ TEST_CASE("[Synth] If rt_dead is active the release sample can sound after the a
|
|||
synth.setSamplesPerBlock(4096);
|
||||
sfz::AudioBuffer<float> buffer { 2, 4096 };
|
||||
|
||||
synth.loadSfzString(fs::current_path(), R"(
|
||||
<region> lokey=62 hikey=64 sample=tests/TestFiles/closedhat.wav loop_mode=one_shot
|
||||
synth.loadSfzString(fs::current_path() / "tests/TestFiles/release.sfz", R"(
|
||||
<region> lokey=62 hikey=64 sample=closedhat.wav loop_mode=one_shot
|
||||
<region> lokey=62 hikey=64 sample=*sine trigger=release
|
||||
loopmode=one_shot ampeg_attack=0.02 ampeg_release=0.1
|
||||
)");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue