Chromium Code Reviews| 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 54% |
| 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..3bdd059d17ae3daf95ad41d6d19d13cbeafc6d79 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,26 @@ |
| * 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" |
| + |
| +#include "webrtc/test/gmock.h" |
|
hlundin-webrtc
2017/04/06 08:10:03
No need for this; it is already present in the h-f
AleBzk
2017/04/06 16:42:41
Done.
|
| namespace webrtc { |
| namespace test { |
| namespace conversational_speech { |
| -MockWavReaderFactory::MockWavReaderFactory() = default; |
| +using testing::Return; |
| + |
| +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_)); |
| +} |
| -MockWavReaderFactory::~MockWavReaderFactory() = default; |
| +MockWavReader::~MockWavReader() = default; |
| } // namespace conversational_speech |
| } // namespace test |