llvm-project/lldb/unittests/DAP/ProtocolUtilsTest.cpp
Ebuka Ezike 03a27230c9
[lldb-dap] Use protocol types for modules request and events. (#146966)
Update tests to fix silently failing test and handle when a module is
removed.
2025-07-08 22:43:53 +01:00

25 lines
739 B
C++

//===-- ProtocolUtilsTest.cpp ---------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "ProtocolUtils.h"
#include "JSONUtils.h"
#include "lldb/API/LLDB.h"
#include "gtest/gtest.h"
#include <optional>
using namespace lldb;
using namespace lldb_dap;
TEST(ProtocolUtilsTest, CreateModule) {
SBTarget target;
SBModule module;
std::optional<protocol::Module> module_opt = CreateModule(target, module);
EXPECT_EQ(module_opt, std::nullopt);
}