================
@@ -0,0 +1,105 @@
+#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
+#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/Progress.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Utility/Listener.h"
+#include "gtest/gtest.h"
+#include <thread>
+
+using namespace lldb;
+using namespace lldb_private;
+
+namespace {
+class ProgressReportTest : public ::testing::Test {
+public:
+  void SetUp() override {
+    FileSystem::Initialize();
+    HostInfo::Initialize();
+    PlatformMacOSX::Initialize();
+    Debugger::Initialize(nullptr);
+  }
+  void TearDown() override {
+    Debugger::Terminate();
+    PlatformMacOSX::Terminate();
+    HostInfo::Terminate();
+    FileSystem::Terminate();
+  }
----------------
JDevlieghere wrote:

There's a utility that simplifies this called `SubsystemRAII`. Here's how you 
use that:

```
#include "TestingSupport/SubsystemRAII.h"

class ProgressReportTest : public ::testing::Test {
SubsystemRAII<FileSystem, HostInfo, PlatformMacOSX, Debugger> subsystems;
}
```

https://github.com/llvm/llvm-project/pull/79533
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to