Skip to content

Commit

Permalink
metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-shandar committed Mar 24, 2024
1 parent e3b634a commit 167c7b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion io-trait/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@ mod test {

#[test]
fn test() {
fn check_len(m: &impl Metadata, len: u64) {
assert_ne!(m.len(), len);
}
let m = fs::metadata("Cargo.toml").unwrap();
assert_ne!(Metadata::len(&m), 0);
check_len(&m, 0);
assert_eq!(Metadata::is_dir(&m), false);
}
}

0 comments on commit 167c7b6

Please sign in to comment.