File tree Expand file tree Collapse file tree 4 files changed +45
-3
lines changed Expand file tree Collapse file tree 4 files changed +45
-3
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,6 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
55tablegen(LLVM Options .inc -gen-opt-parser-defs)
66add_public_tablegen_target(LLDBDAPOptionsTableGen)
77
8- include_directories (${CMAKE_CURRENT_SOURCE_DIR} )
9- include_directories (${CMAKE_CURRENT_BINARY_DIR} )
10-
118add_lldb_library(lldbDAP
129 Breakpoint.cpp
1310 BreakpointBase.cpp
@@ -79,6 +76,9 @@ add_lldb_library(lldbDAP
7976 Support
8077 )
8178
79+ target_include_directories (lldbDAP
80+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR_DIR} )
81+
8282if (LLDB_DAP_WELCOME_MESSAGE)
8383 target_compile_definitions (lldbDAP
8484 PRIVATE
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ endif()
5454add_subdirectory (Breakpoint)
5555add_subdirectory (Callback)
5656add_subdirectory (Core)
57+ add_subdirectory (DAP)
5758add_subdirectory (DataFormatter)
5859add_subdirectory (Disassembler)
5960add_subdirectory (Editline)
Original file line number Diff line number Diff line change 1+ add_lldb_unittest(DAPTests
2+ JSONUtilsTest.cpp
3+
4+ LINK_LIBS
5+ lldbDAP
6+ LINK_COMPONENTS
7+ Support
8+ )
Original file line number Diff line number Diff line change 1+ // ===-- JSONUtilsTest.cpp -------------------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ #include " JSONUtils.h"
10+ #include " lldb/API/SBModule.h"
11+ #include " lldb/API/SBTarget.h"
12+ #include " gtest/gtest.h"
13+
14+ using namespace llvm ;
15+ using namespace lldb ;
16+ using namespace lldb_dap ;
17+
18+ TEST (JSONUtilsTest, GetAsString) {
19+ StringRef str = " foo" ;
20+ json::Value value (" foo" );
21+ EXPECT_EQ (str, GetAsString (value));
22+ }
23+
24+ TEST (JSONUtilsTest, CreateModule) {
25+ SBTarget target;
26+ SBModule module ;
27+
28+ json::Value value = CreateModule (target, module );
29+ json::Object *object = value.getAsObject ();
30+
31+ ASSERT_NE (object, nullptr );
32+ EXPECT_EQ (object->size (), 0UL );
33+ }
You can’t perform that action at this time.
0 commit comments