summaryrefslogtreecommitdiff
path: root/test/src/unistd/pipe_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/unistd/pipe_test.cpp')
-rw-r--r--test/src/unistd/pipe_test.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/src/unistd/pipe_test.cpp b/test/src/unistd/pipe_test.cpp
new file mode 100644
index 000000000000..9c633dea1dba
--- /dev/null
+++ b/test/src/unistd/pipe_test.cpp
@@ -0,0 +1,26 @@
+//===-- Unittests for pipe ------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+#include "src/unistd/close.h"
+#include "src/unistd/pipe.h"
+
+#include "test/UnitTest/ErrnoSetterMatcher.h"
+#include "test/UnitTest/Test.h"
+
+using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
+
+TEST(LlvmLibcPipeTest, SmokeTest) {
+
+ int pipefd[2];
+
+ ASSERT_THAT(LIBC_NAMESPACE::pipe(pipefd), Succeeds());
+
+ ASSERT_THAT(LIBC_NAMESPACE::close(pipefd[0]), Succeeds());
+ ASSERT_THAT(LIBC_NAMESPACE::close(pipefd[1]), Succeeds());
+}
+
+// TODO: Functionality tests