Disable the "updated" tests in favor of integration tests
This commit is contained in:
parent
d5451846a0
commit
75c27b0577
2 changed files with 20 additions and 28 deletions
|
|
@ -33,8 +33,7 @@ TEST_CASE("[ADSREnvelope] Basic state")
|
|||
sfz::ADSREnvelope<float> envelope;
|
||||
std::array<float, 5> output;
|
||||
std::array<float, 5> expected { 0.0, 0.0, 0.0, 0.0, 0.0 };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
absl::c_fill(output, -1.0f);
|
||||
|
|
@ -51,9 +50,8 @@ TEST_CASE("[ADSREnvelope] Attack")
|
|||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
std::array<float, 5> output;
|
||||
std::array<float, 5> expected { 0.0f, 0.5f, 1.0f, 1.0f, 1.0f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 5> expected { 0.5f, 1.0f, 1.0f, 1.0f, 1.0f };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -71,9 +69,8 @@ TEST_CASE("[ADSREnvelope] Attack again")
|
|||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
std::array<float, 5> output;
|
||||
std::array<float, 5> expected { 0.0f, 0.33333f, 0.66667f, 1.0f, 1.0f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 5> expected { 0.33333f, 0.66667f, 1.0f, 1.0f, 1.0f };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -92,10 +89,9 @@ TEST_CASE("[ADSREnvelope] Release")
|
|||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
envelope.startRelease(2);
|
||||
std::array<float, 9> output;
|
||||
std::array<float, 9> expected { 0.0f, 0.5f, 1.0f, 0.08409f, 0.00707f, 0.000594604f, 0.00005f, 0.0f, 0.0f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 8> output;
|
||||
std::array<float, 8> expected { 0.5f, 1.0f, 0.13534f, 0.018f, 0.0024f, 0.0f, 0.0f, 0.0f };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -116,9 +112,8 @@ TEST_CASE("[ADSREnvelope] Delay")
|
|||
std::array<float, 10> output;
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
envelope.startRelease(4);
|
||||
std::array<float, 11> expected { 0.0f, 0.0f, 0.0f, 0.5f, 1.0f, 0.08409f, 0.00707f, 0.000594604f, 0.00005f, 0.0f, 0.0f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 10> expected { 0.0f, 0.0f, 0.5f, 1.0f, 0.13534f, 0.018f, 0.0024f, 0.0f, 0.0f, 0.0f };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -139,9 +134,8 @@ TEST_CASE("[ADSREnvelope] Lower sustain")
|
|||
region.amplitudeEG.sustain = 50.0f;
|
||||
std::array<float, 10> output;
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
std::array<float, 10> expected { 0.0f, 0.0f, 0.5f, 1.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 10> expected { 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -162,9 +156,8 @@ TEST_CASE("[ADSREnvelope] Decay")
|
|||
region.amplitudeEG.decay = 0.02f;
|
||||
std::array<float, 10> output;
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
std::array<float, 10> expected { 0.0f, 0.0f, 0.5f, 1.0f, 0.707107f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5 };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 10> expected { 0.0f, 0.0f, 0.5f, 1.0f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5 };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -187,8 +180,7 @@ TEST_CASE("[ADSREnvelope] Hold")
|
|||
std::array<float, 12> output;
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
std::array<float, 12> expected { 0.0f, 0.0f, 0.5f, 1.0f, 1.0f, 1.0f, 0.707107f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -212,8 +204,7 @@ TEST_CASE("[ADSREnvelope] Hold with release")
|
|||
envelope.startRelease(8);
|
||||
std::array<float, 15> output;
|
||||
std::array<float, 15> expected { 0.0f, 0.0f, 0.0f, 0.5f, 1.0f, 1.0f, 1.0f, 0.707107f, 0.5f, 0.05f, 0.005f, 0.0005f, 0.00005f, 0.0f, 0.0f };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
|
|
@ -237,9 +228,8 @@ TEST_CASE("[ADSREnvelope] Hold with release 2")
|
|||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
envelope.startRelease(4);
|
||||
std::array<float, 15> output;
|
||||
std::array<float, 15> expected { 0.0f, 0.0f, 0.0f, 0.5f, 1.0f, 0.08409f, 0.00707f, 0.000594604f, 0.00005f, 0.0f, 0.0f, 0.0f, 0.0 };
|
||||
for (auto& out : output)
|
||||
out = envelope.getNextValue();
|
||||
std::array<float, 15> expected { 0.0f, 0.0f, 0.5f, 1.0f, 0.08409f, 0.00707f, 0.000594604f, 0.00005f, 0.0f, 0.0f, 0.0f, 0.0 };
|
||||
envelope.getBlock(absl::MakeSpan(output));
|
||||
REQUIRE(approxEqual<float>(output, expected));
|
||||
envelope.reset(region.amplitudeEG, region, state, 0, 0.0f, 100.0f);
|
||||
envelope.startRelease(4);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ set(SFIZZ_TEST_SOURCES
|
|||
OnePoleFilterT.cpp
|
||||
RegionActivationT.cpp
|
||||
RegionValueComputationsT.cpp
|
||||
# If we're tweaking the curves this kind of tests does not make sense
|
||||
# Use integration tests with comparison curves
|
||||
# ADSREnvelopeT.cpp
|
||||
EventEnvelopesT.cpp
|
||||
MainT.cpp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue