[llvm] [orc-rt] Move the unit tests into test/unit (PR #208431)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 04:23:37 PDT 2026


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 origin/main HEAD --extensions h,cpp -- orc-rt/test/unit/AllocActionTest.cpp orc-rt/test/unit/AllocActionTestUtils.h orc-rt/test/unit/BitmaskEnumTest.cpp orc-rt/test/unit/BootstrapInfoTest.cpp orc-rt/test/unit/CallSPSCITest.cpp orc-rt/test/unit/CallableTraitsHelperTest.cpp orc-rt/test/unit/CommonTestUtils.h orc-rt/test/unit/DirectCaller.h orc-rt/test/unit/EndianTest.cpp orc-rt/test/unit/ErrorCAPITest.cpp orc-rt/test/unit/ErrorExceptionInteropTest.cpp orc-rt/test/unit/ErrorTest.cpp orc-rt/test/unit/ExecutorAddressTest.cpp orc-rt/test/unit/ExecutorProcessInfoTest.cpp orc-rt/test/unit/InProcessControllerAccessTest.cpp orc-rt/test/unit/Inputs/NativeDylibManagerTestLib.cpp orc-rt/test/unit/IntervalMapTest.cpp orc-rt/test/unit/IntervalSetTest.cpp orc-rt/test/unit/LockedAccessTest.cpp orc-rt/test/unit/LoggingTest.cpp orc-rt/test/unit/MacroUtilsTest.cpp orc-rt/test/unit/MathTest.cpp orc-rt/test/unit/MemoryAccessSPSCITest.cpp orc-rt/test/unit/MemoryFlagsTest.cpp orc-rt/test/unit/NativeDylibManagerSPSCITest.cpp orc-rt/test/unit/NativeDylibManagerTest.cpp orc-rt/test/unit/QueueingRunnerTest.cpp orc-rt/test/unit/RTTITest.cpp orc-rt/test/unit/SPSAllocActionTest.cpp orc-rt/test/unit/SPSMemoryFlagsTest.cpp orc-rt/test/unit/SPSWrapperFunctionBufferTest.cpp orc-rt/test/unit/SPSWrapperFunctionTest.cpp orc-rt/test/unit/SessionTest.cpp orc-rt/test/unit/SimpleNativeMemoryMapSPSCITest.cpp orc-rt/test/unit/SimpleNativeMemoryMapTest.cpp orc-rt/test/unit/SimplePackedSerializationTest.cpp orc-rt/test/unit/SimplePackedSerializationTestUtils.h orc-rt/test/unit/SimpleSymbolTableTest.cpp orc-rt/test/unit/StandaloneMachOUnwindInfoRegistrarTest.cpp orc-rt/test/unit/TaskGroupTest.cpp orc-rt/test/unit/ThreadPoolRunnerTest.cpp orc-rt/test/unit/WrapperFunctionBufferTest.cpp orc-rt/test/unit/bind-test.cpp orc-rt/test/unit/bit-test.cpp orc-rt/test/unit/iterator_range-test.cpp orc-rt/test/unit/move_only_function-test.cpp orc-rt/test/unit/scope_exit-test.cpp orc-rt/test/unit/span-test.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/orc-rt/test/unit/ErrorExceptionInteropTest.cpp b/orc-rt/test/unit/ErrorExceptionInteropTest.cpp
index cdb50fe2e..717d63de9 100644
--- a/orc-rt/test/unit/ErrorExceptionInteropTest.cpp
+++ b/orc-rt/test/unit/ErrorExceptionInteropTest.cpp
@@ -183,33 +183,33 @@ TEST(ErrorExceptionInteropTest, ErrorExceptionToString) {
       class MyException : public std::exception {
       public:
         ~MyException() override {}
-        const char *what() const noexcept override { return "what"; }
-      };
+        const char *what() const noexcept override { return "what";
+}
+}
+;
 
-      EXPECT_EQ(toString(runCapturingExceptions([]() { throw MyException(); })),
-                "what");
-    }
+EXPECT_EQ(toString(runCapturingExceptions([]() { throw MyException(); })),
+          "what");
+}
 
-    {
-      // std::error_code should be converted by calling `.message()`.
-      auto EC = std::make_error_code(std::errc::cross_device_link);
-      std::string ECErrMsg = EC.message();
-      EXPECT_EQ(toString(runCapturingExceptions([&]() { throw EC; })),
-                ECErrMsg);
-    }
+{
+  // std::error_code should be converted by calling `.message()`.
+  auto EC = std::make_error_code(std::errc::cross_device_link);
+  std::string ECErrMsg = EC.message();
+  EXPECT_EQ(toString(runCapturingExceptions([&]() { throw EC; })), ECErrMsg);
+}
 
-    {
-      // std::string should be converted by copying its value.
-      std::string ErrMsg = "foo";
-      EXPECT_EQ(toString(runCapturingExceptions([&]() { throw ErrMsg; })),
-                ErrMsg);
-    }
+{
+  // std::string should be converted by copying its value.
+  std::string ErrMsg = "foo";
+  EXPECT_EQ(toString(runCapturingExceptions([&]() { throw ErrMsg; })), ErrMsg);
+}
 
-    {
-      // Check that exceptions of other types produce the expected
-      // "unrecognized type" error message:
-      EXPECT_EQ(toString(runCapturingExceptions([]() { throw 42; })),
-                "C++ exception of unknown type");
-    }
-  });
+{
+  // Check that exceptions of other types produce the expected
+  // "unrecognized type" error message:
+  EXPECT_EQ(toString(runCapturingExceptions([]() { throw 42; })),
+            "C++ exception of unknown type");
+}
+});
 }

``````````

</details>


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


More information about the llvm-commits mailing list