aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/TestingSupport/Host/JSONTransportTestUtilities.h
blob: 5a9eb8e59f2b62cee7eded6985d0fbe30dbd79a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_UNITTESTS_TESTINGSUPPORT_HOST_NATIVEPROCESSTESTUTILS_H
#define LLDB_UNITTESTS_TESTINGSUPPORT_HOST_NATIVEPROCESSTESTUTILS_H

#include "lldb/Host/JSONTransport.h"
#include "gmock/gmock.h"

template <typename Req, typename Resp, typename Evt>
class MockMessageHandler final
    : public lldb_private::Transport<Req, Resp, Evt>::MessageHandler {
public:
  MOCK_METHOD(void, Received, (const Evt &), (override));
  MOCK_METHOD(void, Received, (const Req &), (override));
  MOCK_METHOD(void, Received, (const Resp &), (override));
  MOCK_METHOD(void, OnError, (llvm::Error), (override));
  MOCK_METHOD(void, OnClosed, (), (override));
};

#endif