1//===-- ProcessLaunchInfoTest.cpp -----------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "lldb/Host/ProcessLaunchInfo.h"
10#include "gtest/gtest.h"
11
12using namespace lldb_private;
13using namespace lldb;
14
15TEST(ProcessLaunchInfoTest, Constructor) {
16 ProcessLaunchInfo Info(FileSpec("/stdin"), FileSpec("/stdout"),
17 FileSpec("/stderr"), FileSpec("/wd"),
18 eLaunchFlagStopAtEntry);
19 EXPECT_EQ(FileSpec("/stdin"),
20 Info.GetFileActionForFD(STDIN_FILENO)->GetFileSpec());
21 EXPECT_EQ(FileSpec("/stdout"),
22 Info.GetFileActionForFD(STDOUT_FILENO)->GetFileSpec());
23 EXPECT_EQ(FileSpec("/stderr"),
24 Info.GetFileActionForFD(STDERR_FILENO)->GetFileSpec());
25 EXPECT_EQ(FileSpec("/wd"), Info.GetWorkingDirectory());
26 EXPECT_EQ(eLaunchFlagStopAtEntry, Info.GetFlags().Get());
27}
28

source code of lldb/unittests/Host/ProcessLaunchInfoTest.cpp