diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2024-01-26 15:18:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 15:18:22 +0100 |
| commit | 73874f7a39df74eacf1682b3961da2d8cb675f33 (patch) | |
| tree | 275fdfa7b0f4e03dbe36a9c4451ad658ad2d9b2e /libc/test/src/sys/stat/fstat_test.cpp | |
| parent | 035f33bf4138ac7b7360a83438988ce80bda5098 (diff) | |
[libc][NFC] Use specific ASSERT macros to test errno (#79573)
This patch provides specific test macros to deal with `errno`.
This will help abstract away the differences between unit test and integration/hermetic tests in #79319.
In one case we use `libc_errno` which is a struct, in the other case we deal directly with `errno`.
Diffstat (limited to 'libc/test/src/sys/stat/fstat_test.cpp')
| -rw-r--r-- | libc/test/src/sys/stat/fstat_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/test/src/sys/stat/fstat_test.cpp b/libc/test/src/sys/stat/fstat_test.cpp index 22e407f6d791..33769ea1f05a 100644 --- a/libc/test/src/sys/stat/fstat_test.cpp +++ b/libc/test/src/sys/stat/fstat_test.cpp @@ -30,7 +30,7 @@ TEST(LlvmLibcFStatTest, CreatAndReadMode) { int fd = LIBC_NAMESPACE::open(TEST_FILE, O_CREAT | O_WRONLY, S_IRWXU); ASSERT_GT(fd, 0); - ASSERT_EQ(libc_errno, 0); + ASSERT_ERRNO_SUCCESS(); struct stat statbuf; ASSERT_THAT(LIBC_NAMESPACE::fstat(fd, &statbuf), Succeeds(0)); |
