blob: a07480856b6fa6bf55ae3810554cc031cc5c15fc [file] [log] [blame]
andrew@webrtc.org58a59242013-03-25 21:20:38 +00001/*
2 * Copyright (c) 2013 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_TEST_FAKE_COMMON_H_
12#define WEBRTC_TEST_FAKE_COMMON_H_
13
14// Borrowed from libjingle's talk/media/webrtc/fakewebrtccommon.h.
15
16#include "webrtc/typedefs.h"
17
18#define WEBRTC_STUB(method, args) \
19 virtual int method args OVERRIDE { return 0; }
20
21#define WEBRTC_STUB_CONST(method, args) \
22 virtual int method args const OVERRIDE { return 0; }
23
24#define WEBRTC_BOOL_STUB(method, args) \
25 virtual bool method args OVERRIDE { return true; }
26
27#define WEBRTC_VOID_STUB(method, args) \
28 virtual void method args OVERRIDE {}
29
30#define WEBRTC_FUNC(method, args) \
31 virtual int method args OVERRIDE
32
33#define WEBRTC_FUNC_CONST(method, args) \
34 virtual int method args const OVERRIDE
35
36#define WEBRTC_BOOL_FUNC(method, args) \
37 virtual bool method args OVERRIDE
38
39#define WEBRTC_VOID_FUNC(method, args) \
40 virtual void method args OVERRIDE
41
42#define WEBRTC_CHECK_CHANNEL(channel) \
43 if (channels_.find(channel) == channels_.end()) return -1;
44
45#define WEBRTC_ASSERT_CHANNEL(channel) \
46 ASSERT(channels_.find(channel) != channels_.end());
47
48#endif // WEBRTC_TEST_FAKE_COMMON_H_