From 3d5df13f529a15d2fbf33002aac120289820e8a8 Mon Sep 17 00:00:00 2001 From: Paulina Hensman Date: Wed, 12 Dec 2018 13:02:38 +0100 Subject: [PATCH] Switch to literals in playout delay tests It is important that these numbers do not change, so instead of referring to constants we will use literals here. If we need to update them we will simply have to update this test as well. Bug: webrtc:7452 Change-Id: I2808ef08d2236c10666258a8670cc2fd08543143 Reviewed-on: https://webrtc-review.googlesource.com/c/114160 Reviewed-by: Magnus Jedvert Commit-Queue: Paulina Hensman Cr-Commit-Position: refs/heads/master@{#25991} --- .../native_unittests/audio_device/audio_device_unittest.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/android/native_unittests/audio_device/audio_device_unittest.cc b/sdk/android/native_unittests/audio_device/audio_device_unittest.cc index 4ce61e24b1..8774119bff 100644 --- a/sdk/android/native_unittests/audio_device/audio_device_unittest.cc +++ b/sdk/android/native_unittests/audio_device/audio_device_unittest.cc @@ -746,13 +746,13 @@ TEST_F(AudioDeviceTest, // verifies that the audio device reports correct delay estimate given the // selected audio layer. Note that, this delay estimate will only be utilized // if the HW AEC is disabled. +// Delay should be 75 ms in high latency and 25 ms in low latency. TEST_F(AudioDeviceTest, UsesCorrectDelayEstimateForHighLatencyOutputPath) { - EXPECT_EQ(kHighLatencyModeDelayEstimateInMilliseconds / 2, - TestDelayOnAudioLayer(AudioDeviceModule::kAndroidJavaAudio)); + EXPECT_EQ(75, TestDelayOnAudioLayer(AudioDeviceModule::kAndroidJavaAudio)); } TEST_F(AudioDeviceTest, UsesCorrectDelayEstimateForLowLatencyOutputPath) { - EXPECT_EQ(kLowLatencyModeDelayEstimateInMilliseconds / 2, + EXPECT_EQ(25, TestDelayOnAudioLayer( AudioDeviceModule::kAndroidJavaInputAndOpenSLESOutputAudio)); }