@@ -1640,6 +1640,10 @@ fn test_file_times() {
1640
1640
use crate :: os:: ios:: fs:: FileTimesExt ;
1641
1641
#[ cfg( target_os = "macos" ) ]
1642
1642
use crate :: os:: macos:: fs:: FileTimesExt ;
1643
+ #[ cfg( target_os = "tvos" ) ]
1644
+ use crate :: os:: tvos:: fs:: FileTimesExt ;
1645
+ #[ cfg( target_os = "tvos" ) ]
1646
+ use crate :: os:: tvos:: fs:: FileTimesExt ;
1643
1647
#[ cfg( target_os = "watchos" ) ]
1644
1648
use crate :: os:: watchos:: fs:: FileTimesExt ;
1645
1649
#[ cfg( windows) ]
@@ -1651,9 +1655,21 @@ fn test_file_times() {
1651
1655
let accessed = SystemTime :: UNIX_EPOCH + Duration :: from_secs ( 12345 ) ;
1652
1656
let modified = SystemTime :: UNIX_EPOCH + Duration :: from_secs ( 54321 ) ;
1653
1657
times = times. set_accessed ( accessed) . set_modified ( modified) ;
1654
- #[ cfg( any( windows, target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1658
+ #[ cfg( any(
1659
+ windows,
1660
+ target_os = "macos" ,
1661
+ target_os = "ios" ,
1662
+ target_os = "watchos" ,
1663
+ target_os = "tvos" ,
1664
+ ) ) ]
1655
1665
let created = SystemTime :: UNIX_EPOCH + Duration :: from_secs ( 32123 ) ;
1656
- #[ cfg( any( windows, target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1666
+ #[ cfg( any(
1667
+ windows,
1668
+ target_os = "macos" ,
1669
+ target_os = "ios" ,
1670
+ target_os = "watchos" ,
1671
+ target_os = "tvos" ,
1672
+ ) ) ]
1657
1673
{
1658
1674
times = times. set_created ( created) ;
1659
1675
}
@@ -1678,7 +1694,13 @@ fn test_file_times() {
1678
1694
let metadata = file. metadata ( ) . unwrap ( ) ;
1679
1695
assert_eq ! ( metadata. accessed( ) . unwrap( ) , accessed) ;
1680
1696
assert_eq ! ( metadata. modified( ) . unwrap( ) , modified) ;
1681
- #[ cfg( any( windows, target_os = "macos" , target_os = "ios" , target_os = "watchos" ) ) ]
1697
+ #[ cfg( any(
1698
+ windows,
1699
+ target_os = "macos" ,
1700
+ target_os = "ios" ,
1701
+ target_os = "watchos" ,
1702
+ target_os = "tvos" ,
1703
+ ) ) ]
1682
1704
{
1683
1705
assert_eq ! ( metadata. created( ) . unwrap( ) , created) ;
1684
1706
}
0 commit comments