| OLD | NEW |
| (Empty) |
| 1 /* | |
| 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 int method args override { return 0; } | |
| 20 | |
| 21 #define WEBRTC_STUB_CONST(method, args) \ | |
| 22 int method args const override { return 0; } | |
| 23 | |
| 24 #define WEBRTC_BOOL_STUB(method, args) \ | |
| 25 bool method args override { return true; } | |
| 26 | |
| 27 #define WEBRTC_VOID_STUB(method, args) \ | |
| 28 void method args override {} | |
| 29 | |
| 30 #define WEBRTC_FUNC(method, args) int method args override | |
| 31 | |
| 32 #define WEBRTC_FUNC_CONST(method, args) int method args const override | |
| 33 | |
| 34 #define WEBRTC_BOOL_FUNC(method, args) bool method args override | |
| 35 | |
| 36 #define WEBRTC_VOID_FUNC(method, args) void method args override | |
| 37 | |
| 38 #define WEBRTC_CHECK_CHANNEL(channel) \ | |
| 39 if (channels_.find(channel) == channels_.end()) return -1; | |
| 40 | |
| 41 #define WEBRTC_ASSERT_CHANNEL(channel) \ | |
| 42 ASSERT(channels_.find(channel) != channels_.end()); | |
| 43 | |
| 44 #endif // WEBRTC_TEST_FAKE_COMMON_H_ | |
| OLD | NEW |