OLD | NEW |
---|---|
(Empty) | |
1 /* | |
hlundin-webrtc
2016/04/29 11:52:56
We used to have the structure that the mock for pa
kwiberg-webrtc
2016/04/29 23:10:13
Laudable. Will change. But we have only one mock i
| |
2 * Copyright (c) 2016 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 | |
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_ | |
12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_ | |
13 | |
14 #include <vector> | |
15 | |
16 #include "testing/gmock/include/gmock/gmock.h" | |
17 #include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" | |
18 | |
19 namespace webrtc { | |
20 | |
21 class MockAudioDecoderFactory : public AudioDecoderFactory { | |
22 public: | |
23 MOCK_METHOD0(GetSupportedFormats, std::vector<SdpAudioFormat>()); | |
24 std::unique_ptr<AudioDecoder> MakeAudioDecoder( | |
ossu
2016/04/29 12:21:33
Why is this? Just to remove the std::unique_ptr<>
kwiberg-webrtc
2016/04/29 23:10:13
Yes. gmock is pre-C++11 and doesn't properly forwa
ossu
2016/05/02 10:59:40
Ah, I see.
| |
25 const SdpAudioFormat& format) override { | |
26 std::unique_ptr<AudioDecoder> return_value; | |
27 MakeAudioDecoderMock(format, &return_value); | |
28 return return_value; | |
29 } | |
30 MOCK_METHOD2(MakeAudioDecoderMock, | |
31 void(const SdpAudioFormat& format, | |
32 std::unique_ptr<AudioDecoder>* return_value)); | |
33 }; | |
34 | |
35 } // namespace webrtc | |
36 | |
37 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_AUDIO_DECODER_FACTORY_H_ | |
OLD | NEW |