aboutsummaryrefslogtreecommitdiff
path: root/lldb/unittests/DAP/DAPTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/unittests/DAP/DAPTest.cpp')
-rw-r--r--lldb/unittests/DAP/DAPTest.cpp20
1 files changed, 3 insertions, 17 deletions
diff --git a/lldb/unittests/DAP/DAPTest.cpp b/lldb/unittests/DAP/DAPTest.cpp
index 2090fe6..4fd6cd5 100644
--- a/lldb/unittests/DAP/DAPTest.cpp
+++ b/lldb/unittests/DAP/DAPTest.cpp
@@ -9,13 +9,10 @@
#include "DAP.h"
#include "Protocol/ProtocolBase.h"
#include "TestBase.h"
-#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <optional>
-using namespace llvm;
-using namespace lldb;
using namespace lldb_dap;
using namespace lldb_dap_tests;
using namespace lldb_dap::protocol;
@@ -24,18 +21,7 @@ using namespace testing;
class DAPTest : public TransportBase {};
TEST_F(DAPTest, SendProtocolMessages) {
- DAP dap{
- /*log=*/nullptr,
- /*default_repl_mode=*/ReplMode::Auto,
- /*pre_init_commands=*/{},
- /*no_lldbinit=*/false,
- /*client_name=*/"test_client",
- /*transport=*/*transport,
- /*loop=*/loop,
- };
- dap.Send(Event{/*event=*/"my-event", /*body=*/std::nullopt});
- loop.AddPendingCallback(
- [](lldb_private::MainLoopBase &loop) { loop.RequestTermination(); });
- EXPECT_CALL(client, Received(IsEvent("my-event", std::nullopt)));
- ASSERT_THAT_ERROR(dap.Loop(), llvm::Succeeded());
+ dap->Send(Event{/*event=*/"my-event", /*body=*/std::nullopt});
+ EXPECT_CALL(client, Received(IsEvent("my-event")));
+ Run();
}