[Lldb-commits] [lldb] [lldb][progress][NFC] Add unit test for progress reports (PR #79533)

via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 26 15:41:48 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 8f1d94aaea5c18b83cd3b0df3be3a48ef1d3833d 3b490d6ef73ccccc7ab3e8e1985a2cb25bb72a2c -- lldb/unittests/Core/ProgressReportTest.cpp lldb/include/lldb/Core/DebuggerEvents.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/unittests/Core/ProgressReportTest.cpp b/lldb/unittests/Core/ProgressReportTest.cpp
index f62aeda341..71728b6f18 100644
--- a/lldb/unittests/Core/ProgressReportTest.cpp
+++ b/lldb/unittests/Core/ProgressReportTest.cpp
@@ -21,14 +21,14 @@ using namespace lldb;
 using namespace lldb_private;
 
 class ProgressReportTest : public ::testing::Test {
-    SubsystemRAII<FileSystem, HostInfo, PlatformMacOSX> subsystems;
-
-    // The debugger's initialization function can't be called with no arguments
-    // so calling it using SubsystemRAII will cause the test build to fail as
-    // SubsystemRAII will call Initialize with no arguments. As such we set it up
-    // here the usual way.
-    void SetUp() override { Debugger::Initialize(nullptr); }
-    void TearDown() override { Debugger::Terminate(); }
+  SubsystemRAII<FileSystem, HostInfo, PlatformMacOSX> subsystems;
+
+  // The debugger's initialization function can't be called with no arguments
+  // so calling it using SubsystemRAII will cause the test build to fail as
+  // SubsystemRAII will call Initialize with no arguments. As such we set it up
+  // here the usual way.
+  void SetUp() override { Debugger::Initialize(nullptr); }
+  void TearDown() override { Debugger::Terminate(); }
 };
 
 TEST_F(ProgressReportTest, TestReportCreation) {
@@ -52,7 +52,7 @@ TEST_F(ProgressReportTest, TestReportCreation) {
   listener_sp->StartListeningForEvents(&broadcaster,
                                        Debugger::eBroadcastBitProgress);
   EXPECT_TRUE(
-    broadcaster.EventTypeHasListeners(Debugger::eBroadcastBitProgress));
+      broadcaster.EventTypeHasListeners(Debugger::eBroadcastBitProgress));
 
   EventSP event_sp;
   const ProgressEventData *data;

``````````

</details>


https://github.com/llvm/llvm-project/pull/79533


More information about the lldb-commits mailing list