mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-12 02:22:35 +00:00
Add test
This commit is contained in:
@@ -183,11 +183,16 @@ fn test_time() {
|
||||
|
||||
#[test]
|
||||
fn test_information() {
|
||||
use uom::si::information::pebibyte;
|
||||
|
||||
let information = Information::new::<kibibyte>(8.);
|
||||
assert_eq!(information.get::<byte>(), 8192.);
|
||||
|
||||
let information_kib = information.get::<kibibyte>();
|
||||
assert_eq!(information_kib, 8.);
|
||||
|
||||
let largest_exactly_representable = Information::new::<byte>(9_007_199_254_740_992.);
|
||||
assert_eq!(largest_exactly_representable.get::<pebibyte>(), 8.);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user