From 4cf33cf66b3b1f09222d52beddf04beb51763845 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Mon, 18 Sep 2023 00:31:50 +0200 Subject: [PATCH] test(controlobjectaliastest): Add test for renamed `audio_latency_*` COs --- src/test/controlobjectaliastest.cpp | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/test/controlobjectaliastest.cpp b/src/test/controlobjectaliastest.cpp index eac95a3bcf23..e4a4f3660a64 100644 --- a/src/test/controlobjectaliastest.cpp +++ b/src/test/controlobjectaliastest.cpp @@ -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) {