summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-02-03 21:41:12 +0000
committerReid Kleckner <rnk@google.com>2016-02-03 21:41:12 +0000
commitc2e23116277bcca1e347ff2e0cbd43c09f0cda6b (patch)
treeadafb7aa6d5da4fca3c7bf0916338e692cee0385 /llvm/unittests/Support
parentb3596028cf6a7c87fd2ddd2a3a1a97195aab35bc (diff)
downloadbcm5719-llvm-c2e23116277bcca1e347ff2e0cbd43c09f0cda6b.tar.gz
bcm5719-llvm-c2e23116277bcca1e347ff2e0cbd43c09f0cda6b.zip
Silence -Wsign-conversion issue in ProgramTest.cpp
Unfortunately, ProgramInfo::ProcessId is signed on Unix and unsigned on Windows, breaking the standard fix of using '0U' in the gtest expectation. llvm-svn: 259704
Diffstat (limited to 'llvm/unittests/Support')
-rw-r--r--llvm/unittests/Support/ProgramTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/unittests/Support/ProgramTest.cpp b/llvm/unittests/Support/ProgramTest.cpp
index 47a3dbb5fb1..deadaadec1d 100644
--- a/llvm/unittests/Support/ProgramTest.cpp
+++ b/llvm/unittests/Support/ProgramTest.cpp
@@ -223,7 +223,7 @@ TEST_F(ProgramEnvTest, TestExecuteNoWait) {
ProcessInfo PI1 = ExecuteNoWait(Executable, argv, getEnviron(), nullptr, 0,
&Error, &ExecutionFailed);
ASSERT_FALSE(ExecutionFailed) << Error;
- ASSERT_NE(PI1.Pid, 0) << "Invalid process id";
+ ASSERT_NE(PI1.Pid, ProcessInfo::InvalidPid) << "Invalid process id";
unsigned LoopCount = 0;
@@ -242,7 +242,7 @@ TEST_F(ProgramEnvTest, TestExecuteNoWait) {
ProcessInfo PI2 = ExecuteNoWait(Executable, argv, getEnviron(), nullptr, 0,
&Error, &ExecutionFailed);
ASSERT_FALSE(ExecutionFailed) << Error;
- ASSERT_NE(PI2.Pid, 0) << "Invalid process id";
+ ASSERT_NE(PI2.Pid, ProcessInfo::InvalidPid) << "Invalid process id";
// Test that Wait() with SecondsToWait=0 performs a non-blocking wait. In this
// cse, LoopCount should be greater than 1 (more than one increment occurs).
@@ -304,7 +304,7 @@ TEST(ProgramTest, TestExecuteNegative) {
bool ExecutionFailed;
ProcessInfo PI = ExecuteNoWait(Executable, argv, nullptr, nullptr, 0,
&Error, &ExecutionFailed);
- ASSERT_EQ(PI.Pid, 0)
+ ASSERT_EQ(PI.Pid, ProcessInfo::InvalidPid)
<< "On error ExecuteNoWait should return an invalid ProcessInfo";
ASSERT_TRUE(ExecutionFailed);
ASSERT_FALSE(Error.empty());
OpenPOWER on IntegriCloud