Move AudioDecoder and AudioDecoderFactory mocks to webrtc/test/
AudioDecoder and AudioDecoderFactory are in webrtc/api/ now, so move their mocks to someplace central where tests from all over WebRTC are allowed to #include them. BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2798063004 Cr-Commit-Position: refs/heads/master@{#17619}
This commit is contained in:
@ -10,15 +10,15 @@
|
||||
|
||||
// Unit tests for DecisionLogic class and derived classes.
|
||||
|
||||
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/decision_logic.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/buffer_level_filter.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/decoder_database.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/delay_manager.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/delay_peak_detector.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/packet_buffer.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tick_timer.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/mock_audio_decoder_factory.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h"
|
||||
#include "webrtc/test/gmock.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/mock_audio_decoder.h"
|
||||
#include "webrtc/test/mock_audio_decoder_factory.h"
|
||||
|
||||
using testing::_;
|
||||
using testing::Invoke;
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_
|
||||
|
||||
#include "webrtc/api/audio_codecs/audio_decoder.h"
|
||||
#include "webrtc/test/gmock.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class MockAudioDecoder : public AudioDecoder {
|
||||
public:
|
||||
MockAudioDecoder() {}
|
||||
virtual ~MockAudioDecoder() { Die(); }
|
||||
MOCK_METHOD0(Die, void());
|
||||
MOCK_METHOD5(DecodeInternal,
|
||||
int(const uint8_t*, size_t, int, int16_t*, SpeechType*));
|
||||
MOCK_CONST_METHOD0(HasDecodePlc, bool());
|
||||
MOCK_METHOD2(DecodePlc, size_t(size_t, int16_t*));
|
||||
MOCK_METHOD0(Reset, void());
|
||||
MOCK_METHOD5(IncomingPacket, int(const uint8_t*, size_t, uint16_t, uint32_t,
|
||||
uint32_t));
|
||||
MOCK_METHOD0(ErrorCode, int());
|
||||
MOCK_CONST_METHOD2(PacketDuration, int(const uint8_t*, size_t));
|
||||
MOCK_CONST_METHOD0(Channels, size_t());
|
||||
MOCK_CONST_METHOD0(SampleRateHz, int());
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_MOCK_MOCK_AUDIO_DECODER_H_
|
||||
@ -12,11 +12,9 @@
|
||||
|
||||
#include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "webrtc/base/safe_conversions.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/accelerate.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/expand.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/include/neteq.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_audio_decoder.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_buffer_level_filter.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_delay_manager.h"
|
||||
@ -32,6 +30,8 @@
|
||||
#include "webrtc/modules/include/module_common_types.h"
|
||||
#include "webrtc/test/gmock.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/mock_audio_decoder.h"
|
||||
#include "webrtc/test/mock_audio_decoder_factory.h"
|
||||
|
||||
using ::testing::AtLeast;
|
||||
using ::testing::Return;
|
||||
|
||||
@ -18,10 +18,10 @@
|
||||
#include <utility> // pair
|
||||
|
||||
#include "webrtc/api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/packet.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
#include "webrtc/test/mock_audio_decoder_factory.h"
|
||||
|
||||
using ::testing::Return;
|
||||
using ::testing::ReturnNull;
|
||||
|
||||
Reference in New Issue
Block a user