Skip to content

Commit 0acf126

Browse files
authored
Fixed issues 88 and 100 in last PR (#102)
* made parameter state restauration test specific for each parameter * fixed plugin state restauration test
1 parent 5791a16 commit 0acf126

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Source/tests/BasicTests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,15 @@ struct PluginStateTestRestoration : public PluginTest
318318
// Set random parameter values
319319
for (auto parameter : getNonBypassAutomatableParameters(instance))
320320
{
321-
const auto expectedValue = r.nextFloat();
322-
parameter->setValue(expectedValue);
321+
const auto originalValue = parameter->getValue();
322+
parameter->setValue(r.nextFloat());
323323

324324
// Restore original state
325325
callSetStateInformationOnMessageThreadIfVST3(instance, originalState);
326326

327327
// Check parameter values return to original
328-
ut.expectWithinAbsoluteError(parameter->getValue(), expectedValue, tolaratedDiff,
329-
parameter->getName(1024) << " not restored on setStateInformation");
328+
ut.expectWithinAbsoluteError(parameter->getValue(), originalValue, tolaratedDiff,
329+
parameter->getName(1024) + juce::String(" not restored on setStateInformation"));
330330
}
331331

332332
if (strictnessLevel >= 8)

0 commit comments

Comments
 (0)