mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-22 04:37:46 +00:00
Add invalid data test for FileInfo
This commit is contained in:
parent
890c228c85
commit
cfe08de0d7
1 changed files with 10 additions and 0 deletions
10
src/fiin.rs
10
src/fiin.rs
|
@ -142,4 +142,14 @@ mod tests {
|
||||||
|
|
||||||
assert_eq!(*valid_fiin, testing_fiin.write_to_buffer().unwrap());
|
assert_eq!(*valid_fiin, testing_fiin.write_to_buffer().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_invalid() {
|
||||||
|
let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
|
d.push("resources/tests");
|
||||||
|
d.push("random");
|
||||||
|
|
||||||
|
// Feeding it invalid data should not panic
|
||||||
|
FileInfo::from_existing(&read(d).unwrap());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue