[NFC][Coroutines] Use structured binding with llvm::enumerate in CoroSplit (#116879)
[llvm-project.git] / lldb / unittests / Host / ProcessLaunchInfoTest.cpp
blob0b3607092e8775a3706fd328d338fd932fac2ea5
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 //===----------------------------------------------------------------------===//
9 #include "lldb/Host/ProcessLaunchInfo.h"
10 #include "gtest/gtest.h"
12 using namespace lldb_private;
13 using namespace lldb;
15 TEST(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());