blob: aed01646f511a5956c22b2dd8586531c990e3e8c [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"
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000015
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020016#include "test/gmock.h"
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000017
18namespace webrtc {
19
20class MockExpand : public Expand {
21 public:
22 MockExpand(BackgroundNoise* background_noise,
23 SyncBuffer* sync_buffer,
24 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020025 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000026 int fs,
27 size_t num_channels)
Henrik Lundinbef77e22015-08-18 14:58:09 +020028 : Expand(background_noise,
29 sync_buffer,
30 random_vector,
31 statistics,
32 fs,
33 num_channels) {}
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000034 virtual ~MockExpand() { Die(); }
35 MOCK_METHOD0(Die, void());
Yves Gerey665174f2018-06-19 15:03:05 +020036 MOCK_METHOD0(Reset, void());
37 MOCK_METHOD1(Process, int(AudioMultiVector* output));
38 MOCK_METHOD0(SetParametersForNormalAfterExpand, void());
39 MOCK_METHOD0(SetParametersForMergeAfterExpand, void());
40 MOCK_CONST_METHOD0(overlap_length, size_t());
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000041};
42
43} // namespace webrtc
44
45namespace webrtc {
46
47class MockExpandFactory : public ExpandFactory {
48 public:
Henrik Lundinbef77e22015-08-18 14:58:09 +020049 MOCK_CONST_METHOD6(Create,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000050 Expand*(BackgroundNoise* background_noise,
51 SyncBuffer* sync_buffer,
52 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020053 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000054 int fs,
55 size_t num_channels));
56};
57
58} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020059#endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_