()
| 287 | |
| 288 | #[test] |
| 289 | fn to_string_iec() { |
| 290 | let display = Display { |
| 291 | byte_size: ByteSize::gib(1), |
| 292 | format: Format::Iec, |
| 293 | }; |
| 294 | assert_eq!("1.0 GiB", display.to_string()); |
| 295 | |
| 296 | let display = Display { |
| 297 | byte_size: ByteSize::gb(1), |
| 298 | format: Format::Iec, |
| 299 | }; |
| 300 | assert_eq!("953.7 MiB", display.to_string()); |
| 301 | } |
| 302 | |
| 303 | #[test] |
| 304 | fn to_string_si() { |