summaryrefslogtreecommitdiffstats
path: root/library/std/src/fs/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/fs/tests.rs')
-rw-r--r--library/std/src/fs/tests.rs28
1 files changed, 25 insertions, 3 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs
index e2480bcbb..9ff01b9c3 100644
--- a/library/std/src/fs/tests.rs
+++ b/library/std/src/fs/tests.rs
@@ -1640,6 +1640,10 @@ fn test_file_times() {
use crate::os::ios::fs::FileTimesExt;
#[cfg(target_os = "macos")]
use crate::os::macos::fs::FileTimesExt;
+ #[cfg(target_os = "tvos")]
+ use crate::os::tvos::fs::FileTimesExt;
+ #[cfg(target_os = "tvos")]
+ use crate::os::tvos::fs::FileTimesExt;
#[cfg(target_os = "watchos")]
use crate::os::watchos::fs::FileTimesExt;
#[cfg(windows)]
@@ -1651,9 +1655,21 @@ fn test_file_times() {
let accessed = SystemTime::UNIX_EPOCH + Duration::from_secs(12345);
let modified = SystemTime::UNIX_EPOCH + Duration::from_secs(54321);
times = times.set_accessed(accessed).set_modified(modified);
- #[cfg(any(windows, target_os = "macos", target_os = "ios", target_os = "watchos"))]
+ #[cfg(any(
+ windows,
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "watchos",
+ target_os = "tvos",
+ ))]
let created = SystemTime::UNIX_EPOCH + Duration::from_secs(32123);
- #[cfg(any(windows, target_os = "macos", target_os = "ios", target_os = "watchos"))]
+ #[cfg(any(
+ windows,
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "watchos",
+ target_os = "tvos",
+ ))]
{
times = times.set_created(created);
}
@@ -1678,7 +1694,13 @@ fn test_file_times() {
let metadata = file.metadata().unwrap();
assert_eq!(metadata.accessed().unwrap(), accessed);
assert_eq!(metadata.modified().unwrap(), modified);
- #[cfg(any(windows, target_os = "macos", target_os = "ios", target_os = "watchos"))]
+ #[cfg(any(
+ windows,
+ target_os = "macos",
+ target_os = "ios",
+ target_os = "watchos",
+ target_os = "tvos",
+ ))]
{
assert_eq!(metadata.created().unwrap(), created);
}