blob: 05fdaec750dc8cfd15e5f9cb71d6b092578c6726 [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());
36 MOCK_METHOD0(Reset,
37 void());
38 MOCK_METHOD1(Process,
39 int(AudioMultiVector* output));
40 MOCK_METHOD0(SetParametersForNormalAfterExpand,
41 void());
42 MOCK_METHOD0(SetParametersForMergeAfterExpand,
43 void());
44 MOCK_CONST_METHOD0(overlap_length,
45 size_t());
46};
47
48} // namespace webrtc
49
50namespace webrtc {
51
52class MockExpandFactory : public ExpandFactory {
53 public:
Henrik Lundinbef77e22015-08-18 14:58:09 +020054 MOCK_CONST_METHOD6(Create,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000055 Expand*(BackgroundNoise* background_noise,
56 SyncBuffer* sync_buffer,
57 RandomVector* random_vector,
Henrik Lundinbef77e22015-08-18 14:58:09 +020058 StatisticsCalculator* statistics,
henrik.lundin@webrtc.orgee0fb182014-09-02 13:22:11 +000059 int fs,
60 size_t num_channels));
61};
62
63} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020064#endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_