Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc

Issue 2781573002: Conversational Speech tool, MultiEndCall::CheckTiming() and tests (Closed)
Patch Set: missing include to get std::back_inserter working on win targets Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
diff --git a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
similarity index 56%
copy from webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
copy to webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
index 1097639527b92891f36b8ab3618a3594118c8e1e..7d2f2b663e9e5509ba5f1120c66d23e82c5ff751 100644
--- a/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.cc
+++ b/webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.cc
@@ -8,15 +8,24 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader_factory.h"
+#include "webrtc/modules/audio_processing/test/conversational_speech/mock_wavreader.h"
namespace webrtc {
namespace test {
namespace conversational_speech {
-MockWavReaderFactory::MockWavReaderFactory() = default;
+using testing::Return;
-MockWavReaderFactory::~MockWavReaderFactory() = default;
+MockWavReader::MockWavReader(
+ int sample_rate, size_t num_channels, size_t num_samples)
+ : sample_rate_(sample_rate), num_channels_(num_channels),
+ num_samples_(num_samples) {
+ ON_CALL(*this, sample_rate()).WillByDefault(Return(sample_rate_));
+ ON_CALL(*this, num_channels()).WillByDefault(Return(num_channels_));
+ ON_CALL(*this, num_samples()).WillByDefault(Return(num_samples_));
+}
+
+MockWavReader::~MockWavReader() = default;
} // namespace conversational_speech
} // namespace test

Powered by Google App Engine
This is Rietveld 408576698