diff options
Diffstat (limited to 'lldb/unittests/Host/ProcessLaunchInfoTest.cpp')
-rw-r--r-- | lldb/unittests/Host/ProcessLaunchInfoTest.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lldb/unittests/Host/ProcessLaunchInfoTest.cpp b/lldb/unittests/Host/ProcessLaunchInfoTest.cpp new file mode 100644 index 00000000000..8a42265453b --- /dev/null +++ b/lldb/unittests/Host/ProcessLaunchInfoTest.cpp @@ -0,0 +1,28 @@ +//===-- ProcessLaunchInfoTest.cpp -------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Host/ProcessLaunchInfo.h" +#include "gtest/gtest.h" + +using namespace lldb_private; +using namespace lldb; + +TEST(ProcessLaunchInfoTest, Constructor) { + ProcessLaunchInfo Info(FileSpec("/stdin"), FileSpec("/stdout"), + FileSpec("/stderr"), FileSpec("/wd"), + eLaunchFlagStopAtEntry); + EXPECT_EQ(FileSpec("/stdin"), + Info.GetFileActionForFD(STDIN_FILENO)->GetFileSpec()); + EXPECT_EQ(FileSpec("/stdout"), + Info.GetFileActionForFD(STDOUT_FILENO)->GetFileSpec()); + EXPECT_EQ(FileSpec("/stderr"), + Info.GetFileActionForFD(STDERR_FILENO)->GetFileSpec()); + EXPECT_EQ(FileSpec("/wd"), Info.GetWorkingDirectory()); + EXPECT_EQ(eLaunchFlagStopAtEntry, Info.GetFlags().Get()); +} |