Skip to content

Commit 6519da9

Browse files
committed
[lldb][lldb-dap] update merge changes
1 parent 0b5db4e commit 6519da9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lldb/tools/lldb-dap/Protocol/ProtocolTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ struct Source {
318318

319319
// unsupported keys: origin, sources, adapterData, checksums
320320
};
321+
bool fromJSON(const llvm::json::Value &, Source::PresentationHint &,
322+
llvm::json::Path);
321323
llvm::json::Value toJSON(Source::PresentationHint);
322324
bool fromJSON(const llvm::json::Value &, Source &, llvm::json::Path);
323325
llvm::json::Value toJSON(const Source &);

lldb/unittests/DAP/ProtocolTypesTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ TEST(ProtocolTypesTest, Scope) {
335335

336336
TEST(ProtocolTypesTest, PresentationHint) {
337337
// Test all PresentationHint values.
338-
std::vector<std::pair<PresentationHint, llvm::StringRef>> test_cases = {
339-
{ePresentationHintNormal, "normal"},
340-
{ePresentationHintEmphasize, "emphasize"},
341-
{ePresentationHintDeemphasize, "deemphasize"}};
338+
std::vector<std::pair<Source::PresentationHint, llvm::StringRef>> test_cases =
339+
{{Source::eSourcePresentationHintNormal, "normal"},
340+
{Source::eSourcePresentationHintEmphasize, "emphasize"},
341+
{Source::eSourcePresentationHintDeemphasize, "deemphasize"}};
342342

343343
for (const auto &test_case : test_cases) {
344344
// Serialize the PresentationHint to JSON.
@@ -347,7 +347,7 @@ TEST(ProtocolTypesTest, PresentationHint) {
347347
EXPECT_EQ(serialized.getAsString(), test_case.second);
348348

349349
// Deserialize the JSON back to PresentationHint.
350-
PresentationHint deserialized;
350+
Source::PresentationHint deserialized;
351351
llvm::json::Path::Root root;
352352
ASSERT_TRUE(fromJSON(serialized, deserialized, root))
353353
<< llvm::toString(root.getError());
@@ -356,7 +356,7 @@ TEST(ProtocolTypesTest, PresentationHint) {
356356

357357
// Test invalid value.
358358
llvm::json::Value invalid_value = "invalid_hint";
359-
PresentationHint deserialized_invalid;
359+
Source::PresentationHint deserialized_invalid;
360360
llvm::json::Path::Root root;
361361
EXPECT_FALSE(fromJSON(invalid_value, deserialized_invalid, root));
362362
}

0 commit comments

Comments
 (0)