blob: 9d667790216dad4cbf28e15246c96b3b85e7480e [file] [log] [blame]
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +00001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
12#define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/audio_coding/neteq/expand.h"
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "test/gmock.h"
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000016
17namespace webrtc {
18
19class MockExpand : public Expand {
20 public:
21 MockExpand(BackgroundNoise* background_noise,
22 SyncBuffer* sync_buffer,
23 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020024 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000025 int fs,
26 size_t num_channels)
Henrik Lundinbef77e22015-08-18 14:58:09 +020027 : Expand(background_noise,
28 sync_buffer,
29 random_vector,
30 statistics,
31 fs,
32 num_channels) {}
Danil Chapovalov704fb552020-05-18 15:10:15 +020033 ~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));
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000040};
41
42} // namespace webrtc
43
44namespace webrtc {
45
46class MockExpandFactory : public ExpandFactory {
47 public:
Danil Chapovalov704fb552020-05-18 15:10:15 +020048 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));
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000057};
58
59} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020060#endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_