This commit is contained in:
Simon Gardling
2022-05-16 09:58:17 -04:00
parent de2a24e469
commit bc5b239e65
7 changed files with 12 additions and 46 deletions

View File

@@ -119,16 +119,3 @@ fn hashed_storage() {
assert_eq!(read.0.chars().map(|c| c as u8).collect::<Vec<u8>>(), commit);
assert_eq!(read.1, data);
}
#[test]
fn format_bytes() {
use std::collections::HashMap;
use ytbn_graphing_software::format_bytes;
let values: HashMap<usize, &str> =
HashMap::from([(1000, "1000 B"), (10000, "10.00 KB"), (1100000, "1.10 MB")]);
for (key, value) in values {
assert_eq!(format_bytes(key), value);
}
}