xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/test_tools/quic_mock_syscall_wrapper.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_QUIC_TEST_TOOLS_QUIC_MOCK_SYSCALL_WRAPPER_H_
6 #define QUICHE_QUIC_TEST_TOOLS_QUIC_MOCK_SYSCALL_WRAPPER_H_
7 
8 #include "quiche/quic/core/quic_syscall_wrapper.h"
9 #include "quiche/quic/platform/api/quic_test.h"
10 
11 namespace quic {
12 namespace test {
13 
14 class MockQuicSyscallWrapper : public QuicSyscallWrapper {
15  public:
16   // Create a standard mock object.
17   MockQuicSyscallWrapper() = default;
18 
19   // Create a 'mockable' object that delegates everything to |delegate| by
20   // default.
21   explicit MockQuicSyscallWrapper(QuicSyscallWrapper* delegate);
22 
23   MOCK_METHOD(ssize_t, Sendmsg, (int sockfd, const msghdr*, int flags),
24               (override));
25 
26   MOCK_METHOD(int, Sendmmsg,
27               (int sockfd, mmsghdr*, unsigned int vlen, int flags), (override));
28 };
29 
30 }  // namespace test
31 }  // namespace quic
32 
33 #endif  // QUICHE_QUIC_TEST_TOOLS_QUIC_MOCK_SYSCALL_WRAPPER_H_
34