1 /* 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ 12 #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ 13 14 #include "modules/audio_coding/neteq/expand.h" 15 #include "test/gmock.h" 16 17 namespace webrtc { 18 19 class MockExpand : public Expand { 20 public: MockExpand(BackgroundNoise * background_noise,SyncBuffer * sync_buffer,RandomVector * random_vector,StatisticsCalculator * statistics,int fs,size_t num_channels)21 MockExpand(BackgroundNoise* background_noise, 22 SyncBuffer* sync_buffer, 23 RandomVector* random_vector, 24 StatisticsCalculator* statistics, 25 int fs, 26 size_t num_channels) 27 : Expand(background_noise, 28 sync_buffer, 29 random_vector, 30 statistics, 31 fs, 32 num_channels) {} ~MockExpand()33 ~MockExpand() override { Die(); } 34 MOCK_METHOD(void, Die, ()); 35 MOCK_METHOD(void, Reset, (), (override)); 36 MOCK_METHOD(int, Process, (AudioMultiVector * output), (override)); 37 MOCK_METHOD(void, SetParametersForNormalAfterExpand, (), (override)); 38 MOCK_METHOD(void, SetParametersForMergeAfterExpand, (), (override)); 39 MOCK_METHOD(size_t, overlap_length, (), (const, override)); 40 }; 41 42 } // namespace webrtc 43 44 namespace webrtc { 45 46 class MockExpandFactory : public ExpandFactory { 47 public: 48 MOCK_METHOD(Expand*, 49 Create, 50 (BackgroundNoise * background_noise, 51 SyncBuffer* sync_buffer, 52 RandomVector* random_vector, 53 StatisticsCalculator* statistics, 54 int fs, 55 size_t num_channels), 56 (const, override)); 57 }; 58 59 } // namespace webrtc 60 #endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_ 61