We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d8cb3a commit 19e0439Copy full SHA for 19e0439
libc/test/src/poll/poll_test.cpp
@@ -6,6 +6,7 @@
6
//
7
//===----------------------------------------------------------------------===//
8
9
+#include "hdr/limits_macros.h" // UINT_MAX
10
#include "src/errno/libc_errno.h"
11
#include "src/poll/poll.h"
12
#include "test/UnitTest/Test.h"
@@ -16,3 +17,9 @@ TEST(LlvmLibcPollTest, SmokeTest) {
16
17
ASSERT_ERRNO_SUCCESS();
18
ASSERT_EQ(0, ret);
19
}
20
+TEST(LlvmLibcPollTest, SmokeFailureTest) {
21
+ LIBC_NAMESPACE::libc_errno = 0;
22
+ int ret = LIBC_NAMESPACE::poll(nullptr, UINT_MAX, 0);
23
+ ASSERT_ERRNO_EQ(EINVAL);
24
+ ASSERT_EQ(-1, ret);
25
+}
0 commit comments