1//===-- Unittests for epoll_wait ------------------------------------------===//
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/errno/libc_errno.h"
9#include "src/sys/epoll/epoll_wait.h"
10#include "test/UnitTest/ErrnoSetterMatcher.h"
11#include "test/UnitTest/Test.h"
12
13using namespace LIBC_NAMESPACE::testing::ErrnoSetterMatcher;
14
15TEST(LlvmLibcEpollWaitTest, Basic) {
16 EXPECT_THAT(LIBC_NAMESPACE::epoll_wait(-1, nullptr, 0, 0),
17 returns(EQ(-1ul)).with_errno(EQ(EINVAL)));
18}
19
20// TODO: Complete these tests when epoll_create is implemented.
21

source code of libc/test/src/sys/epoll/linux/epoll_wait_test.cpp