https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/129251
None >From 47533d045849b72495b51ba7b99913301895cc7a Mon Sep 17 00:00:00 2001 From: Matt Arsenault <matthew.arsena...@amd.com> Date: Fri, 28 Feb 2025 20:13:23 +0700 Subject: [PATCH] unittests: Use EXPECT_ instead of ASSERT_ in a few tests --- llvm/unittests/Support/ProgramTest.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/unittests/Support/ProgramTest.cpp b/llvm/unittests/Support/ProgramTest.cpp index b1b35eacd1f61..47d2e269afe94 100644 --- a/llvm/unittests/Support/ProgramTest.cpp +++ b/llvm/unittests/Support/ProgramTest.cpp @@ -422,10 +422,10 @@ TEST(ProgramTest, TestExecuteNegative) { bool ExecutionFailed; int RetCode = ExecuteAndWait(Executable, argv, std::nullopt, {}, 0, 0, &Error, &ExecutionFailed); - ASSERT_LT(RetCode, 0) << "On error ExecuteAndWait should return 0 or " + EXPECT_LT(RetCode, 0) << "On error ExecuteAndWait should return 0 or " "positive value indicating the result code"; - ASSERT_TRUE(ExecutionFailed); - ASSERT_FALSE(Error.empty()); + EXPECT_TRUE(ExecutionFailed); + EXPECT_FALSE(Error.empty()); } { @@ -433,10 +433,10 @@ TEST(ProgramTest, TestExecuteNegative) { bool ExecutionFailed; ProcessInfo PI = ExecuteNoWait(Executable, argv, std::nullopt, {}, 0, &Error, &ExecutionFailed); - ASSERT_EQ(PI.Pid, ProcessInfo::InvalidPid) + EXPECT_EQ(PI.Pid, ProcessInfo::InvalidPid) << "On error ExecuteNoWait should return an invalid ProcessInfo"; - ASSERT_TRUE(ExecutionFailed); - ASSERT_FALSE(Error.empty()); + EXPECT_TRUE(ExecutionFailed); + EXPECT_FALSE(Error.empty()); } } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits