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

source code of libc/test/src/unistd/pipe_test.cpp