Skip to content

Commit

Permalink
test(controlobjectaliastest): Add test for renamed audio_latency_* COs
Browse files Browse the repository at this point in the history
  • Loading branch information
Holzhaus committed Sep 17, 2023
1 parent 86b9956 commit 4cf33cf
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/test/controlobjectaliastest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,40 @@ TEST_F(ControlObjectAliasTest, EngineMixer) {
auto sampleRate = ControlProxy(ConfigKey(kAppGroup, QStringLiteral("samplerate")));
auto sampleRateLegacy = ControlProxy(ConfigKey(kLegacyGroup, QStringLiteral("samplerate")));
EXPECT_DOUBLE_EQ(sampleRate.get(), sampleRateLegacy.get());

auto audioLatencyUsage = ControlProxy(
ConfigKey(kAppGroup, QStringLiteral("audio_latency_usage")));
auto audioLatencyUsageLegacy = ControlProxy(
ConfigKey(kLegacyGroup, QStringLiteral("audio_latency_usage")));
EXPECT_DOUBLE_EQ(audioLatencyUsage.get(), audioLatencyUsageLegacy.get());

// `audio_latency_usage` is a ControlPotMeter control. Check if its
// additional COs are also aliased correctly.
auto audioLatencyUsageSetOne = ControlProxy(
ConfigKey(kAppGroup, QStringLiteral("audio_latency_usage_set_one")));
auto audioLatencyUsageSetOneLegacy = ControlProxy(
ConfigKey(kLegacyGroup, QStringLiteral("audio_latency_usage_set_one")));
EXPECT_DOUBLE_EQ(audioLatencyUsageSetOne.get(), audioLatencyUsageSetOneLegacy.get());

auto audioLatencyOverload = ControlProxy(
ConfigKey(kAppGroup, QStringLiteral("audio_latency_overload")));
auto audioLatencyOverloadLegacy = ControlProxy(
ConfigKey(kLegacyGroup, QStringLiteral("audio_latency_overload")));
EXPECT_DOUBLE_EQ(audioLatencyOverload.get(), audioLatencyOverloadLegacy.get());

// `audio_latency_overload` is a ControlPotMeter control. Check if its
// additional COs are also aliased correctly.
auto audioLatencyOverloadSetOne = ControlProxy(
ConfigKey(kAppGroup, QStringLiteral("audio_latency_overload_set_one")));
auto audioLatencyOverloadSetOneLegacy = ControlProxy(
ConfigKey(kLegacyGroup, QStringLiteral("audio_latency_overload_set_one")));
EXPECT_DOUBLE_EQ(audioLatencyOverloadSetOne.get(), audioLatencyOverloadSetOneLegacy.get());

auto audioLatencyOverloadCount = ControlProxy(ConfigKey(
kAppGroup, QStringLiteral("audio_latency_overload_count")));
auto audioLatencyOverloadCountLegacy = ControlProxy(ConfigKey(
kLegacyGroup, QStringLiteral("audio_latency_overload_count")));
EXPECT_DOUBLE_EQ(audioLatencyOverloadCount.get(), audioLatencyOverloadCountLegacy.get());
}

TEST_F(ControlObjectAliasTest, PlayerManager) {
Expand Down

0 comments on commit 4cf33cf

Please sign in to comment.