From de7c125c54c499c2a5f3bf31bb72bbd57f6fe5f3 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 11 Mar 2021 08:11:07 +0100 Subject: [PATCH] Add connections unit test --- tests/ModulationsT.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/ModulationsT.cpp b/tests/ModulationsT.cpp index 72c38cb6..516a34ae 100644 --- a/tests/ModulationsT.cpp +++ b/tests/ModulationsT.cpp @@ -354,3 +354,20 @@ TEST_CASE("[Modulations] Aftertouch connections") R"("ChannelAftertouch" -> "FilterCutoff {1, N=2}")", }, 2)); } + +TEST_CASE("[Modulations] LFO v1 connections") +{ + sfz::Synth synth; + synth.loadSfzString("/modulation.sfz", R"( + sample=*sine amplfo_freq=1.0 + sample=*sine pitchlfo_freq=1.0 + sample=*sine fillfo_freq=1.0 + )"); + + const std::string graph = synth.getResources().modMatrix.toDotGraph(); + REQUIRE(graph == createDefaultGraph({ + R"("AmplitudeLFO {0}" -> "Volume {0}")", + R"("PitchLFO {1}" -> "Pitch {1}")", + R"("FilterLFO {2}" -> "FilterCutoff {2, N=1}")", + }, 3)); +}