mock_expand.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #ifndef MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
  11. #define MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_
  12. #include "modules/audio_coding/neteq/expand.h"
  13. #include "test/gmock.h"
  14. namespace webrtc {
  15. class MockExpand : public Expand {
  16. public:
  17. MockExpand(BackgroundNoise* background_noise,
  18. SyncBuffer* sync_buffer,
  19. RandomVector* random_vector,
  20. StatisticsCalculator* statistics,
  21. int fs,
  22. size_t num_channels)
  23. : Expand(background_noise,
  24. sync_buffer,
  25. random_vector,
  26. statistics,
  27. fs,
  28. num_channels) {}
  29. ~MockExpand() override { Die(); }
  30. MOCK_METHOD(void, Die, ());
  31. MOCK_METHOD(void, Reset, (), (override));
  32. MOCK_METHOD(int, Process, (AudioMultiVector * output), (override));
  33. MOCK_METHOD(void, SetParametersForNormalAfterExpand, (), (override));
  34. MOCK_METHOD(void, SetParametersForMergeAfterExpand, (), (override));
  35. MOCK_METHOD(size_t, overlap_length, (), (const, override));
  36. };
  37. } // namespace webrtc
  38. namespace webrtc {
  39. class MockExpandFactory : public ExpandFactory {
  40. public:
  41. MOCK_METHOD(Expand*,
  42. Create,
  43. (BackgroundNoise * background_noise,
  44. SyncBuffer* sync_buffer,
  45. RandomVector* random_vector,
  46. StatisticsCalculator* statistics,
  47. int fs,
  48. size_t num_channels),
  49. (const, override));
  50. };
  51. } // namespace webrtc
  52. #endif // MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_EXPAND_H_