[Lldb-commits] [PATCH] D158893: [lldb] Fix TestVSCode_completions on Darwin

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 25 14:35:26 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa7ca1175d0d4: [lldb] Fix & re-enable TestVSCode_completions on Darwin (authored by JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158893/new/

https://reviews.llvm.org/D158893

Files:
  lldb/test/API/tools/lldb-vscode/completions/TestVSCode_completions.py
  lldb/test/API/tools/lldb-vscode/completions/main.cpp


Index: lldb/test/API/tools/lldb-vscode/completions/main.cpp
===================================================================
--- lldb/test/API/tools/lldb-vscode/completions/main.cpp
+++ lldb/test/API/tools/lldb-vscode/completions/main.cpp
@@ -12,7 +12,11 @@
   foo* next_foo;
 };
 
-int fun(std::vector<std::string> var) {
+struct baz {
+  char c;
+};
+
+int fun(std::vector<baz> var) {
   return var.size(); // breakpoint 1
 }
 
@@ -21,10 +25,10 @@
   int var2 = 1;
   std::string str1 = "a";
   std::string str2 = "b";
-  std::vector<std::string> vec;
+  std::vector<baz> vec;
   fun(vec);
   bar bar1 = {2};
-  bar* bar2 = &bar1; 
+  bar* bar2 = &bar1;
   foo foo1 = {3,&bar1, bar1, NULL};
   return 0; // breakpoint 2
 }
Index: lldb/test/API/tools/lldb-vscode/completions/TestVSCode_completions.py
===================================================================
--- lldb/test/API/tools/lldb-vscode/completions/TestVSCode_completions.py
+++ lldb/test/API/tools/lldb-vscode/completions/TestVSCode_completions.py
@@ -19,19 +19,18 @@
             self.assertNotIn(not_expected_item, actual_list)
 
     @skipIfWindows
-    @skipIfDarwin  # Skip this test for now until we can figure out why tings aren't working on build bots
     def test_completions(self):
         """
         Tests the completion request at different breakpoints
         """
         program = self.getBuildArtifact("a.out")
         self.build_and_launch(program)
+
         source = "main.cpp"
         breakpoint1_line = line_number(source, "// breakpoint 1")
         breakpoint2_line = line_number(source, "// breakpoint 2")
-        breakpoint_ids = self.set_source_breakpoints(
-            source, [breakpoint1_line, breakpoint2_line]
-        )
+
+        self.set_source_breakpoints(source, [breakpoint1_line, breakpoint2_line])
         self.continue_to_next_stop()
 
         # shouldn't see variables inside main
@@ -40,7 +39,7 @@
             [
                 {
                     "text": "var",
-                    "label": "var -- vector<basic_string<char>> &",
+                    "label": "var -- vector<baz> &",
                 }
             ],
             [
@@ -71,7 +70,7 @@
             [
                 {
                     "text": "var",
-                    "label": "var -- vector<basic_string<char>> &",
+                    "label": "var -- vector<baz> &",
                 }
             ],
         )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158893.553633.patch
Type: text/x-patch
Size: 2424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230825/2a9ec79d/attachment.bin>


More information about the lldb-commits mailing list