summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h')
-rw-r--r--lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h61
1 files changed, 27 insertions, 34 deletions
diff --git a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
index 6ceeccfaf81..2aad2ae4972 100644
--- a/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
+++ b/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
@@ -9,47 +9,40 @@
#ifndef lldb_unittests_Process_gdb_remote_GDBRemoteTestUtils_h
#define lldb_unittests_Process_gdb_remote_GDBRemoteTestUtils_h
-#include "gtest/gtest.h"
#include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h"
+#include "gtest/gtest.h"
-namespace lldb_private
-{
-namespace process_gdb_remote
-{
+namespace lldb_private {
+namespace process_gdb_remote {
-class GDBRemoteTest : public testing::Test
-{
+class GDBRemoteTest : public testing::Test {
public:
- static void
- SetUpTestCase();
+ static void SetUpTestCase();
- static void
- TearDownTestCase();
+ static void TearDownTestCase();
};
-void
-Connect(GDBRemoteCommunication &client, GDBRemoteCommunication &server);
-
-struct MockServer : public GDBRemoteCommunicationServer
-{
- MockServer() : GDBRemoteCommunicationServer("mock-server", "mock-server.listener") { m_send_acks = false; }
-
- PacketResult
- SendPacket(llvm::StringRef payload)
- {
- return GDBRemoteCommunicationServer::SendPacketNoLock(payload);
- }
-
- PacketResult
- GetPacket(StringExtractorGDBRemote &response)
- {
- const unsigned timeout_usec = 1000000; // 1s
- const bool sync_on_timeout = false;
- return WaitForPacketWithTimeoutMicroSecondsNoLock(response, timeout_usec, sync_on_timeout);
- }
-
- using GDBRemoteCommunicationServer::SendOKResponse;
- using GDBRemoteCommunicationServer::SendUnimplementedResponse;
+void Connect(GDBRemoteCommunication &client, GDBRemoteCommunication &server);
+
+struct MockServer : public GDBRemoteCommunicationServer {
+ MockServer()
+ : GDBRemoteCommunicationServer("mock-server", "mock-server.listener") {
+ m_send_acks = false;
+ }
+
+ PacketResult SendPacket(llvm::StringRef payload) {
+ return GDBRemoteCommunicationServer::SendPacketNoLock(payload);
+ }
+
+ PacketResult GetPacket(StringExtractorGDBRemote &response) {
+ const unsigned timeout_usec = 1000000; // 1s
+ const bool sync_on_timeout = false;
+ return WaitForPacketWithTimeoutMicroSecondsNoLock(response, timeout_usec,
+ sync_on_timeout);
+ }
+
+ using GDBRemoteCommunicationServer::SendOKResponse;
+ using GDBRemoteCommunicationServer::SendUnimplementedResponse;
};
} // namespace process_gdb_remote
OpenPOWER on IntegriCloud