Skip to content

Commit 520dab3

Browse files
committed
Adjusting the style of declaration in the new tests.
1 parent ed4b3cf commit 520dab3

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,39 +249,36 @@ llvm::json::Value toJSON(const AdapterFeature &);
249249
/// Information about the capabilities of a debug adapter.
250250
struct Capabilities {
251251
/// The supported features for this adapter.
252-
llvm::DenseSet<AdapterFeature> supportedFeatures{};
252+
llvm::DenseSet<AdapterFeature> supportedFeatures;
253253

254254
/// Available exception filter options for the `setExceptionBreakpoints`
255255
/// request.
256256
std::optional<std::vector<ExceptionBreakpointsFilter>>
257-
exceptionBreakpointFilters{};
257+
exceptionBreakpointFilters;
258258

259259
/// The set of characters that should trigger completion in a REPL. If not
260260
/// specified, the UI should assume the `.` character.
261-
std::optional<std::vector<std::string>> completionTriggerCharacters =
262-
std::nullopt;
261+
std::optional<std::vector<std::string>> completionTriggerCharacters;
263262

264263
/// The set of additional module information exposed by the debug adapter.
265-
std::optional<std::vector<ColumnDescriptor>> additionalModuleColumns =
266-
std::nullopt;
264+
std::optional<std::vector<ColumnDescriptor>> additionalModuleColumns;
267265

268266
/// Checksum algorithms supported by the debug adapter.
269-
std::optional<std::vector<ChecksumAlgorithm>> supportedChecksumAlgorithms =
270-
std::nullopt;
267+
std::optional<std::vector<ChecksumAlgorithm>> supportedChecksumAlgorithms;
271268

272269
/// Modes of breakpoints supported by the debug adapter, such as 'hardware' or
273270
/// 'software'. If present, the client may allow the user to select a mode and
274271
/// include it in its `setBreakpoints` request.
275272
///
276273
/// Clients may present the first applicable mode in this array as the
277274
/// 'default' mode in gestures that set breakpoints.
278-
std::optional<std::vector<BreakpointMode>> breakpointModes = std::nullopt;
275+
std::optional<std::vector<BreakpointMode>> breakpointModes;
279276

280277
/// lldb-dap Extensions
281278
/// @{
282279

283280
/// The version of the adapter.
284-
std::optional<std::string> lldbExtVersion = std::nullopt;
281+
std::optional<std::string> lldbExtVersion;
285282

286283
/// @}
287284
};

lldb/unittests/DAP/ProtocolTypesTest.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,11 +670,14 @@ TEST(ProtocolTypesTest, ThreadResponseBody) {
670670
}
671671

672672
TEST(ProtocolTypesTest, CapabilitiesEventBody) {
673-
const CapabilitiesEventBody body{Capabilities{/*supportedFeatures=*/{
673+
Capabilities capabilities;
674+
capabilities.supportedFeatures = {
674675
eAdapterFeatureANSIStyling,
675676
eAdapterFeatureBreakpointLocationsRequest,
676-
}}};
677-
const StringRef json = R"({
677+
};
678+
CapabilitiesEventBody body;
679+
body.capabilities = capabilities;
680+
StringRef json = R"({
678681
"capabilities": {
679682
"supportsANSIStyling": true,
680683
"supportsBreakpointLocationsRequest": true

0 commit comments

Comments
 (0)