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/ErrnoSetterMatcher.h"
12 #include "test/UnitTest/Test.h"
15 #include <sys/select.h>
18 using __llvm_libc::testing::ErrnoSetterMatcher::Fails
;
20 TEST(LlvmLibcSelectTest
, SelectInvalidFD
) {
23 struct timeval timeout
{
26 ASSERT_THAT(__llvm_libc::select(-1, &set
, nullptr, nullptr, &timeout
),