1 //===-- Failure unittests for select --------------------------------------===//
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 //===----------------------------------------------------------------------===//
9 #include "src/sys/select/select.h"
10 #include "src/unistd/read.h"
11 #include "test/UnitTest/ErrnoSetterMatcher.h"
12 #include "test/UnitTest/Test.h"
14 #include <sys/select.h>
17 using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails
;
19 TEST(LlvmLibcSelectTest
, SelectInvalidFD
) {
22 struct timeval timeout
{
25 ASSERT_THAT(LIBC_NAMESPACE::select(-1, &set
, nullptr, nullptr, &timeout
),