|
7 | 7 | //===----------------------------------------------------------------------===//
|
8 | 8 |
|
9 | 9 | #include "hdr/fcntl_macros.h"
|
| 10 | +#include "hdr/sys_stat_macros.h" |
10 | 11 | #include "hdr/types/struct_timeval.h"
|
11 | 12 | #include "src/errno/libc_errno.h"
|
12 | 13 | #include "src/fcntl/open.h"
|
13 | 14 | #include "src/stdio/remove.h"
|
14 | 15 | #include "src/sys/stat/stat.h"
|
15 | 16 | #include "src/sys/time/utimes.h"
|
16 | 17 | #include "src/unistd/close.h"
|
| 18 | + |
| 19 | +#include "test/UnitTest/ErrnoCheckingTest.h" |
17 | 20 | #include "test/UnitTest/ErrnoSetterMatcher.h"
|
18 | 21 | #include "test/UnitTest/Test.h"
|
19 | 22 |
|
20 |
| -#include <sys/stat.h> |
| 23 | +using LlvmLibcUtimesTest = LIBC_NAMESPACE::testing::ErrnoCheckingTest; |
21 | 24 |
|
22 | 25 | // SUCCESS: Takes a file and successfully updates
|
23 | 26 | // its last access and modified times.
|
24 |
| -TEST(LlvmLibcUtimesTest, ChangeTimesSpecific) { |
| 27 | +TEST_F(LlvmLibcUtimesTest, ChangeTimesSpecific) { |
25 | 28 | using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
26 | 29 |
|
27 | 30 | constexpr const char *FILE_PATH = "utimes_pass.test";
|
@@ -60,7 +63,7 @@ TEST(LlvmLibcUtimesTest, ChangeTimesSpecific) {
|
60 | 63 |
|
61 | 64 | // FAILURE: Invalid values in the timeval struct
|
62 | 65 | // to check that utimes rejects it.
|
63 |
| -TEST(LlvmLibcUtimesTest, InvalidMicroseconds) { |
| 66 | +TEST_F(LlvmLibcUtimesTest, InvalidMicroseconds) { |
64 | 67 | using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
|
65 | 68 | using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
66 | 69 |
|
|
0 commit comments