1 //===-- Unittests for pipe ------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
8 #include "src/unistd/close.h"
9 #include "src/unistd/pipe.h"
11 #include "test/UnitTest/ErrnoSetterMatcher.h"
12 #include "test/UnitTest/Test.h"
14 using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher
;
16 TEST(LlvmLibcPipeTest
, SmokeTest
) {
20 ASSERT_THAT(LIBC_NAMESPACE::pipe(pipefd
), Succeeds());
22 ASSERT_THAT(LIBC_NAMESPACE::close(pipefd
[0]), Succeeds());
23 ASSERT_THAT(LIBC_NAMESPACE::close(pipefd
[1]), Succeeds());
26 // TODO: Functionality tests